Condividi tramite


IConventionSkipNavigation.SetForeignKey Metodo

Definizione

Imposta la chiave esterna.

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

Parametri

foreignKey
IConventionForeignKey

Chiave esterna. null Il passaggio comporterà l'assenza di chiave esterna associata.

fromDataAnnotation
Boolean

Indica se la configurazione è stata specificata utilizzando un'annotazione dati.

Restituisce

Nuova chiave esterna.

Si applica a