IConventionForeignKey.HasDependentToPrincipal 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
HasDependentToPrincipal(String, Boolean) |
已淘汰.
在指向主體實體的相依實體類型上設定導覽屬性。 |
HasDependentToPrincipal(MemberInfo, Boolean) |
已淘汰.
在指向主體實體的相依實體類型上設定導覽屬性。 |
HasDependentToPrincipal(String, Boolean)
警告
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)
警告
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
指出是否使用資料批註來指定組態。
傳回
新建立的導覽屬性。
- 屬性