Aracılığıyla paylaş


IConventionSkipNavigation.SetForeignKey Yöntem

Tanım

Yabancı anahtarı ayarlar.

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

Parametreler

foreignKey
IConventionForeignKey

Yabancı anahtar. null Geçiş, ilişkili yabancı anahtar olmamasıyla sonuçlanır.

fromDataAnnotation
Boolean

Yapılandırmanın bir veri ek açıklaması kullanılarak belirtilip belirtilmedidiğini gösterir.

Döndürülenler

Yeni yabancı anahtar.

Şunlara uygulanır