Partager via


IConventionEntityTypeBuilder.PrimaryKey Méthode

Définition

Surcharges

PrimaryKey(IReadOnlyList<IConventionProperty>, Boolean)

Définit les propriétés qui composent la clé primaire pour ce type d’entité.

PrimaryKey(IReadOnlyList<String>, Boolean)

Définit les propriétés qui composent la clé primaire pour ce type d’entité.

PrimaryKey(IReadOnlyList<IConventionProperty>, Boolean)

Définit les propriétés qui composent la clé primaire pour ce type d’entité.

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionKeyBuilder PrimaryKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> properties, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionKeyBuilder? PrimaryKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>? properties, bool fromDataAnnotation = false);
abstract member PrimaryKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionKeyBuilder
Public Function PrimaryKey (properties As IReadOnlyList(Of IConventionProperty), Optional fromDataAnnotation As Boolean = false) As IConventionKeyBuilder

Paramètres

properties
IReadOnlyList<IConventionProperty>

Propriétés qui composent la clé primaire.

fromDataAnnotation
Boolean

Indique si la configuration a été spécifiée à l’aide d’une annotation de données.

Retours

Objet qui peut être utilisé pour configurer la clé primaire.

S’applique à

PrimaryKey(IReadOnlyList<String>, Boolean)

Définit les propriétés qui composent la clé primaire pour ce type d’entité.

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionKeyBuilder? PrimaryKey (System.Collections.Generic.IReadOnlyList<string>? propertyNames, bool fromDataAnnotation = false);
abstract member PrimaryKey : System.Collections.Generic.IReadOnlyList<string> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionKeyBuilder
Public Function PrimaryKey (propertyNames As IReadOnlyList(Of String), Optional fromDataAnnotation As Boolean = false) As IConventionKeyBuilder

Paramètres

propertyNames
IReadOnlyList<String>

Noms des propriétés qui composent la clé primaire.

fromDataAnnotation
Boolean

Indique si la configuration a été spécifiée à l’aide d’une annotation de données.

Retours

Objet qui peut être utilisé pour configurer la clé primaire.

S’applique à