IConventionForeignKey.SetDependentToPrincipal 方法

定義

多載

SetDependentToPrincipal(MemberInfo, Boolean)

在指向主體實體的相依實體類型上設定導覽屬性。

SetDependentToPrincipal(String, Boolean)

在指向主體實體的相依實體類型上設定導覽屬性。

SetDependentToPrincipal(MemberInfo, Boolean)

在指向主體實體的相依實體類型上設定導覽屬性。

public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation SetDependentToPrincipal (System.Reflection.MemberInfo property, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation? SetDependentToPrincipal (System.Reflection.MemberInfo? property, bool fromDataAnnotation = false);
abstract member SetDependentToPrincipal : System.Reflection.MemberInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
Public Function SetDependentToPrincipal (property As MemberInfo, Optional fromDataAnnotation As Boolean = false) As IConventionNavigation

參數

property
MemberInfo

相依類型的導覽屬性。 null傳遞會導致未定義導覽屬性。

fromDataAnnotation
Boolean

指出是否使用資料批註來指定組態。

傳回

新建立的導覽屬性。

適用於

SetDependentToPrincipal(String, Boolean)

在指向主體實體的相依實體類型上設定導覽屬性。

public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation SetDependentToPrincipal (string name, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation? SetDependentToPrincipal (string? name, bool fromDataAnnotation = false);
abstract member SetDependentToPrincipal : string * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
Public Function SetDependentToPrincipal (name As String, Optional fromDataAnnotation As Boolean = false) As IConventionNavigation

參數

name
String

相依型別上的導覽屬性名稱。 null傳遞會導致未定義導覽屬性。

fromDataAnnotation
Boolean

指出是否使用資料批註來指定組態。

傳回

新建立的導覽屬性。

適用於