IConventionSkipNavigation.SetForeignKey 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.IConventionForeignKey SetForeignKey(Microsoft.EntityFrameworkCore.Metadata.IConventionForeignKey foreignKey, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.IConventionForeignKey? SetForeignKey(Microsoft.EntityFrameworkCore.Metadata.IConventionForeignKey? foreignKey, bool fromDataAnnotation = false);
abstract member SetForeignKey : Microsoft.EntityFrameworkCore.Metadata.IConventionForeignKey * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionForeignKey
Public Function SetForeignKey (foreignKey As IConventionForeignKey, Optional fromDataAnnotation As Boolean = false) As IConventionForeignKey
Paramètres
- foreignKey
- IConventionForeignKey
Clé étrangère. La réussite null entraîne l’absence de clé étrangère associée.
- fromDataAnnotation
- Boolean
Indique si la configuration a été spécifiée à l’aide d’une annotation de données.
Retours
Nouvelle clé étrangère.