CosmosEntityTypeExtensions.SetPartitionKeyPropertyName 方法

定义

重载

SetPartitionKeyPropertyName(IMutableEntityType, String)

设置用于存储分区键的属性的名称。

SetPartitionKeyPropertyName(IConventionEntityType, String, Boolean)

设置用于存储分区键的属性的名称。

SetPartitionKeyPropertyName(IMutableEntityType, String)

设置用于存储分区键的属性的名称。

public static void SetPartitionKeyPropertyName (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, string name);
public static void SetPartitionKeyPropertyName (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, string? name);
static member SetPartitionKeyPropertyName : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * string -> unit
<Extension()>
Public Sub SetPartitionKeyPropertyName (entityType As IMutableEntityType, name As String)

参数

entityType
IMutableEntityType

要为其设置分区键属性名称的实体类型。

name
String

要设置的名称。

适用于

SetPartitionKeyPropertyName(IConventionEntityType, String, Boolean)

设置用于存储分区键的属性的名称。

public static void SetPartitionKeyPropertyName (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, string name, bool fromDataAnnotation = false);
public static void SetPartitionKeyPropertyName (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, string? name, bool fromDataAnnotation = false);
public static string? SetPartitionKeyPropertyName (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, string? name, bool fromDataAnnotation = false);
static member SetPartitionKeyPropertyName : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * string * bool -> unit
static member SetPartitionKeyPropertyName : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * string * bool -> string
<Extension()>
Public Sub SetPartitionKeyPropertyName (entityType As IConventionEntityType, name As String, Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetPartitionKeyPropertyName (entityType As IConventionEntityType, name As String, Optional fromDataAnnotation As Boolean = false) As String

参数

entityType
IConventionEntityType

要为其设置分区键属性名称的实体类型。

name
String

要设置的名称。

fromDataAnnotation
Boolean

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

返回

适用于