CosmosEntityTypeExtensions.SetPartitionKeyPropertyName Method

Definition

Overloads

SetPartitionKeyPropertyName(IMutableEntityType, String)

Sets the name of the property that is used to store the partition key key.

SetPartitionKeyPropertyName(IConventionEntityType, String, Boolean)

Sets the name of the property that is used to store the partition key.

SetPartitionKeyPropertyName(IMutableEntityType, String)

Sets the name of the property that is used to store the partition key key.

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)

Parameters

entityType
IMutableEntityType

The entity type to set the partition key property name for.

name
String

The name to set.

Applies to

SetPartitionKeyPropertyName(IConventionEntityType, String, Boolean)

Sets the name of the property that is used to store the partition key.

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

Parameters

entityType
IConventionEntityType

The entity type to set the partition key property name for.

name
String

The name to set.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

Applies to