IConventionEntityTypeBuilder.CanHaveNavigation 方法

定義

多載

CanHaveNavigation(MemberInfo, Boolean)

傳回值,指出指定的導覽是否可以新增至這個實體類型。

CanHaveNavigation(String, Boolean)
已淘汰.

傳回值,指出指定的導覽是否可以新增至這個實體類型。

CanHaveNavigation(String, Type, Boolean)

傳回值,指出指定的導覽是否可以新增至這個實體類型。

CanHaveNavigation(MemberInfo, Boolean)

傳回值,指出指定的導覽是否可以新增至這個實體類型。

public virtual bool CanHaveNavigation (System.Reflection.MemberInfo navigation, bool fromDataAnnotation = false);
abstract member CanHaveNavigation : System.Reflection.MemberInfo * bool -> bool
override this.CanHaveNavigation : System.Reflection.MemberInfo * bool -> bool
Public Overridable Function CanHaveNavigation (navigation As MemberInfo, Optional fromDataAnnotation As Boolean = false) As Boolean

參數

navigation
MemberInfo

導覽成員。

fromDataAnnotation
Boolean

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

傳回

true 如果可以套用組態,則為 。

適用於

CanHaveNavigation(String, Boolean)

警告

Use CanHaveNavigation with Type parameter

傳回值,指出指定的導覽是否可以新增至這個實體類型。

public bool CanHaveNavigation (string navigationName, bool fromDataAnnotation = false);
[System.Obsolete("Use CanHaveNavigation with Type parameter")]
public bool CanHaveNavigation (string navigationName, bool fromDataAnnotation = false);
abstract member CanHaveNavigation : string * bool -> bool
[<System.Obsolete("Use CanHaveNavigation with Type parameter")>]
abstract member CanHaveNavigation : string * bool -> bool
Public Function CanHaveNavigation (navigationName As String, Optional fromDataAnnotation As Boolean = false) As Boolean

參數

navigationName
String

導覽的名稱。

fromDataAnnotation
Boolean

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

傳回

true 如果可以套用組態,則為 。

屬性

適用於

CanHaveNavigation(String, Type, Boolean)

傳回值,指出指定的導覽是否可以新增至這個實體類型。

public bool CanHaveNavigation (string navigationName, Type? type, bool fromDataAnnotation = false);
abstract member CanHaveNavigation : string * Type * bool -> bool
Public Function CanHaveNavigation (navigationName As String, type As Type, Optional fromDataAnnotation As Boolean = false) As Boolean

參數

navigationName
String

導覽的名稱。

type
Type

導覽目標的型別。

fromDataAnnotation
Boolean

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

傳回

true 如果可以新增略過導覽,則為 。

適用於