RelationalOwnedNavigationBuilderExtensions.ToJson Method

Definition

Overloads

ToJson(OwnedNavigationBuilder)

Configures a relationship where this entity type and the entities that it owns are mapped to a JSON column in the database.

ToJson(OwnedNavigationBuilder, String)

Configures a relationship where this entity type and the entities that it owns are mapped to a JSON column in the database.

ToJson<TOwnerEntity,TDependentEntity>(OwnedNavigationBuilder<TOwnerEntity,TDependentEntity>)

Configures a relationship where this entity type and the entities that it owns are mapped to a JSON column in the database.

ToJson<TOwnerEntity,TDependentEntity>(OwnedNavigationBuilder<TOwnerEntity,TDependentEntity>, String)

Configures a relationship where this entity type and the entities that it owns are mapped to a JSON column in the database.

ToJson(OwnedNavigationBuilder)

Source:
RelationalOwnedNavigationBuilderExtensions.cs
Source:
RelationalOwnedNavigationBuilderExtensions.cs
Source:
RelationalOwnedNavigationBuilderExtensions.cs

Configures a relationship where this entity type and the entities that it owns are mapped to a JSON column in the database.

C#
public static Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder ToJson (this Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder builder);

Parameters

builder
OwnedNavigationBuilder

The builder for the owned navigation being configured.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

This method should only be specified for the outer-most owned entity in the given ownership structure. All entities owned by this will be automatically mapped to the same JSON column. The ownerships must still be explicitly defined. Name of the navigation will be used as the JSON column name.

Applies to

Entity Framework Core 9.0 ja muud versioonid
Toode Versioonid
Entity Framework Core 7.0, 8.0, 9.0

ToJson(OwnedNavigationBuilder, String)

Source:
RelationalOwnedNavigationBuilderExtensions.cs
Source:
RelationalOwnedNavigationBuilderExtensions.cs
Source:
RelationalOwnedNavigationBuilderExtensions.cs

Configures a relationship where this entity type and the entities that it owns are mapped to a JSON column in the database.

C#
public static Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder ToJson (this Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder builder, string? jsonColumnName);

Parameters

builder
OwnedNavigationBuilder

The builder for the owned navigation being configured.

jsonColumnName
String

JSON column name to use.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

This method should only be specified for the outer-most owned entity in the given ownership structure. All entities owned by this will be automatically mapped to the same JSON column. The ownerships must still be explicitly defined.

Applies to

Entity Framework Core 9.0 ja muud versioonid
Toode Versioonid
Entity Framework Core 7.0, 8.0, 9.0

ToJson<TOwnerEntity,TDependentEntity>(OwnedNavigationBuilder<TOwnerEntity,TDependentEntity>)

Source:
RelationalOwnedNavigationBuilderExtensions.cs
Source:
RelationalOwnedNavigationBuilderExtensions.cs
Source:
RelationalOwnedNavigationBuilderExtensions.cs

Configures a relationship where this entity type and the entities that it owns are mapped to a JSON column in the database.

C#
public static Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TOwnerEntity,TDependentEntity> ToJson<TOwnerEntity,TDependentEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TOwnerEntity,TDependentEntity> builder) where TOwnerEntity : class where TDependentEntity : class;

Type Parameters

TOwnerEntity
TDependentEntity

Parameters

builder
OwnedNavigationBuilder<TOwnerEntity,TDependentEntity>

The builder for the owned navigation being configured.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

This method should only be specified for the outer-most owned entity in the given ownership structure. All entities owned by this will be automatically mapped to the same JSON column. The ownerships must still be explicitly defined. Name of the navigation will be used as the JSON column name.

Applies to

Entity Framework Core 9.0 ja muud versioonid
Toode Versioonid
Entity Framework Core 7.0, 8.0, 9.0

ToJson<TOwnerEntity,TDependentEntity>(OwnedNavigationBuilder<TOwnerEntity,TDependentEntity>, String)

Source:
RelationalOwnedNavigationBuilderExtensions.cs
Source:
RelationalOwnedNavigationBuilderExtensions.cs
Source:
RelationalOwnedNavigationBuilderExtensions.cs

Configures a relationship where this entity type and the entities that it owns are mapped to a JSON column in the database.

C#
public static Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TOwnerEntity,TDependentEntity> ToJson<TOwnerEntity,TDependentEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TOwnerEntity,TDependentEntity> builder, string? jsonColumnName) where TOwnerEntity : class where TDependentEntity : class;

Type Parameters

TOwnerEntity
TDependentEntity

Parameters

builder
OwnedNavigationBuilder<TOwnerEntity,TDependentEntity>

The builder for the owned navigation being configured.

jsonColumnName
String

JSON column name to use.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

This method should only be specified for the outer-most owned entity in the given ownership structure. All entities owned by this will be automatically mapped to the same JSON column. The ownerships must still be explicitly defined.

Applies to

Entity Framework Core 9.0 ja muud versioonid
Toode Versioonid
Entity Framework Core 7.0, 8.0, 9.0