IConventionEntityTypeBuilder.HasNoKey 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
HasNoKey(Boolean) |
Configure le type d’entité pour qu’il n’ait aucune clé. Il ne sera utilisable que pour les requêtes. |
HasNoKey(IConventionKey, Boolean) |
Supprime une clé primaire ou secondaire de ce type d’entité. |
HasNoKey(IReadOnlyList<IConventionProperty>, Boolean) |
Supprime une clé primaire ou secondaire de ce type d’entité. |
HasNoKey(Boolean)
Configure le type d’entité pour qu’il n’ait aucune clé. Il ne sera utilisable que pour les requêtes.
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder HasNoKey (bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder? HasNoKey (bool fromDataAnnotation = false);
abstract member HasNoKey : bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder
Public Function HasNoKey (Optional fromDataAnnotation As Boolean = false) As IConventionEntityTypeBuilder
Paramètres
- fromDataAnnotation
- Boolean
Indique si la configuration a été spécifiée à l’aide d’une annotation de données.
Retours
Le même générateur instance si le type d’entité a été configuré comme sans clé, null
sinon.
S’applique à
HasNoKey(IConventionKey, Boolean)
Supprime une clé primaire ou secondaire de ce type d’entité.
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder HasNoKey (Microsoft.EntityFrameworkCore.Metadata.IConventionKey key, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder? HasNoKey (Microsoft.EntityFrameworkCore.Metadata.IConventionKey key, bool fromDataAnnotation = false);
abstract member HasNoKey : Microsoft.EntityFrameworkCore.Metadata.IConventionKey * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder
Public Function HasNoKey (key As IConventionKey, Optional fromDataAnnotation As Boolean = false) As IConventionEntityTypeBuilder
Paramètres
- key
- IConventionKey
Clé à supprimer.
- fromDataAnnotation
- Boolean
Indique si la configuration a été spécifiée à l’aide d’une annotation de données.
Retours
Le même générateur instance si la clé a été supprimée, null
sinon.
S’applique à
HasNoKey(IReadOnlyList<IConventionProperty>, Boolean)
Supprime une clé primaire ou secondaire de ce type d’entité.
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder HasNoKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> properties, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder? HasNoKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> properties, bool fromDataAnnotation = false);
abstract member HasNoKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder
Public Function HasNoKey (properties As IReadOnlyList(Of IConventionProperty), Optional fromDataAnnotation As Boolean = false) As IConventionEntityTypeBuilder
Paramètres
- properties
- IReadOnlyList<IConventionProperty>
Propriétés qui composent la clé.
- fromDataAnnotation
- Boolean
Indique si la configuration a été spécifiée à l’aide d’une annotation de données.
Retours
Clé supprimée.
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