CosmosEntityTypeBuilderExtensions.ToJsonProperty 方法

定义

重载

ToJsonProperty(OwnedNavigationBuilder, String)

配置实体在存储为嵌入文档时映射到的属性名称。

ToJsonProperty(IConventionEntityTypeBuilder, String, Boolean)

配置实体在存储为嵌入文档时映射到的属性名称。

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

配置实体在存储为嵌入文档时映射到的属性名称。

ToJsonProperty(OwnedNavigationBuilder, String)

配置实体在存储为嵌入文档时映射到的属性名称。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder ToJsonProperty (this Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder entityTypeBuilder, string name);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder ToJsonProperty (this Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder entityTypeBuilder, string? name);
static member ToJsonProperty : Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder
<Extension()>
Public Function ToJsonProperty (entityTypeBuilder As OwnedNavigationBuilder, name As String) As OwnedNavigationBuilder

参数

entityTypeBuilder
OwnedNavigationBuilder

要配置的实体类型的生成器。

name
String

父属性的名称。

返回

同一生成器实例,以便可以链接多个调用。

注解

有关详细信息和示例,请参阅为实体类型和关系建模和使用 EF Core 访问 Azure Cosmos DB

适用于

ToJsonProperty(IConventionEntityTypeBuilder, String, Boolean)

配置实体在存储为嵌入文档时映射到的属性名称。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder ToJsonProperty (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder entityTypeBuilder, string name, bool fromDataAnnotation = false);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder? ToJsonProperty (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder entityTypeBuilder, string? name, bool fromDataAnnotation = false);
static member ToJsonProperty : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder * string * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder
<Extension()>
Public Function ToJsonProperty (entityTypeBuilder As IConventionEntityTypeBuilder, name As String, Optional fromDataAnnotation As Boolean = false) As IConventionEntityTypeBuilder

参数

entityTypeBuilder
IConventionEntityTypeBuilder

要配置的实体类型的生成器。

name
String

父属性的名称。

fromDataAnnotation
Boolean

指示是否使用数据注释指定配置。

返回

如果应用了配置,则为同一生成器实例, null 否则为 。

注解

有关详细信息和示例,请参阅为实体类型和关系建模和使用 EF Core 访问 Azure Cosmos DB

适用于

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

配置实体在存储为嵌入文档时映射到的属性名称。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TDependentEntity> ToJsonProperty<TEntity,TDependentEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TDependentEntity> entityTypeBuilder, string name) where TEntity : class where TDependentEntity : class;
public static Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TOwnerEntity,TDependentEntity> ToJsonProperty<TOwnerEntity,TDependentEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TOwnerEntity,TDependentEntity> entityTypeBuilder, string? name) where TOwnerEntity : class where TDependentEntity : class;
static member ToJsonProperty : Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'DependentEntity (requires 'Entity : null and 'DependentEntity : null)> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'DependentEntity (requires 'Entity : null and 'DependentEntity : null)> (requires 'Entity : null and 'DependentEntity : null)
static member ToJsonProperty : Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'OwnerEntity, 'DependentEntity (requires 'OwnerEntity : null and 'DependentEntity : null)> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'OwnerEntity, 'DependentEntity (requires 'OwnerEntity : null and 'DependentEntity : null)> (requires 'OwnerEntity : null and 'DependentEntity : null)
<Extension()>
Public Function ToJsonProperty(Of TEntity As Class, TDependentEntity As Class) (entityTypeBuilder As OwnedNavigationBuilder(Of TEntity, TDependentEntity), name As String) As OwnedNavigationBuilder(Of TEntity, TDependentEntity)
<Extension()>
Public Function ToJsonProperty(Of TOwnerEntity As Class, TDependentEntity As Class) (entityTypeBuilder As OwnedNavigationBuilder(Of TOwnerEntity, TDependentEntity), name As String) As OwnedNavigationBuilder(Of TOwnerEntity, TDependentEntity)

类型参数

TEntity TOwnerEntity
TDependentEntity

参数

entityTypeBuilder
OwnedNavigationBuilder<TOwnerEntity,TDependentEntity>

要配置的实体类型的生成器。

name
String

父属性的名称。

返回

OwnedNavigationBuilder<TEntity,TDependentEntity>

同一生成器实例,以便可以链接多个调用。

注解

有关详细信息和示例,请参阅为实体类型和关系建模和使用 EF Core 访问 Azure Cosmos DB

适用于