Compartir a través de


IConventionSkipNavigation.SetForeignKey Método

Definición

Establece la clave externa.

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

Parámetros

foreignKey
IConventionForeignKey

Clave externa. Pasar null dará como resultado que no haya ninguna clave externa asociada.

fromDataAnnotation
Boolean

Indica si la configuración se especificó mediante una anotación de datos.

Devoluciones

Nueva clave externa.

Se aplica a