IConventionEntityTypeBuilder.PrimaryKey Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
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 à
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour