CosmosEntityTypeExtensions.SetPartitionKeyPropertyName 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
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
指示配置是否是使用数据注释指定的。
返回
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈