IConventionSkipNavigationBuilder.HasForeignKey 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.
Définit la clé étrangère.
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionSkipNavigationBuilder HasForeignKey (Microsoft.EntityFrameworkCore.Metadata.IConventionForeignKey foreignKey, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionSkipNavigationBuilder? HasForeignKey (Microsoft.EntityFrameworkCore.Metadata.IConventionForeignKey? foreignKey, bool fromDataAnnotation = false);
abstract member HasForeignKey : Microsoft.EntityFrameworkCore.Metadata.IConventionForeignKey * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionSkipNavigationBuilder
Public Function HasForeignKey (foreignKey As IConventionForeignKey, Optional fromDataAnnotation As Boolean = false) As IConventionSkipNavigationBuilder
Paramètres
- foreignKey
- IConventionForeignKey
Clé étrangère. Si vous passez null
, aucune clé étrangère n’est associée.
- 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 configuration a été appliquée, null
sinon.
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