共用方式為


IConventionForeignKey.HasDependentToPrincipal 方法

定義

多載

HasDependentToPrincipal(String, Boolean)
已淘汰.

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

HasDependentToPrincipal(MemberInfo, Boolean)
已淘汰.

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

HasDependentToPrincipal(String, Boolean)

來源:
IConventionForeignKey.cs
來源:
IConventionForeignKey.cs

警告

Use SetDependentToPrincipal

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

public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation HasDependentToPrincipal (string name, bool fromDataAnnotation = false);
[System.Obsolete("Use SetDependentToPrincipal")]
public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation HasDependentToPrincipal (string name, bool fromDataAnnotation = false);
[System.Obsolete("Use SetDependentToPrincipal")]
public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation? HasDependentToPrincipal (string? name, bool fromDataAnnotation = false);
abstract member HasDependentToPrincipal : string * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
[<System.Obsolete("Use SetDependentToPrincipal")>]
abstract member HasDependentToPrincipal : string * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
override this.HasDependentToPrincipal : string * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
Public Function HasDependentToPrincipal (name As String, Optional fromDataAnnotation As Boolean = false) As IConventionNavigation
Public Overridable Function HasDependentToPrincipal (name As String, Optional fromDataAnnotation As Boolean = false) As IConventionNavigation

參數

name
String

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

fromDataAnnotation
Boolean

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

傳回

新建立的導覽屬性。

屬性

適用於

HasDependentToPrincipal(MemberInfo, Boolean)

來源:
IConventionForeignKey.cs
來源:
IConventionForeignKey.cs

警告

Use SetDependentToPrincipal

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

public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation HasDependentToPrincipal (System.Reflection.MemberInfo property, bool fromDataAnnotation = false);
[System.Obsolete("Use SetDependentToPrincipal")]
public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation HasDependentToPrincipal (System.Reflection.MemberInfo property, bool fromDataAnnotation = false);
[System.Obsolete("Use SetDependentToPrincipal")]
public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation? HasDependentToPrincipal (System.Reflection.MemberInfo? property, bool fromDataAnnotation = false);
abstract member HasDependentToPrincipal : System.Reflection.MemberInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
[<System.Obsolete("Use SetDependentToPrincipal")>]
abstract member HasDependentToPrincipal : System.Reflection.MemberInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
override this.HasDependentToPrincipal : System.Reflection.MemberInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
Public Function HasDependentToPrincipal (property As MemberInfo, Optional fromDataAnnotation As Boolean = false) As IConventionNavigation
Public Overridable Function HasDependentToPrincipal (property As MemberInfo, Optional fromDataAnnotation As Boolean = false) As IConventionNavigation

參數

property
MemberInfo

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

fromDataAnnotation
Boolean

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

傳回

新建立的導覽屬性。

屬性

適用於