語言

IConventionNavigationBase 介面

定義

代表一種可用於導航關係的導航屬性。

public interface IConventionNavigationBase : Microsoft.EntityFrameworkCore.Metadata.IConventionPropertyBase, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyNavigationBase
public interface IConventionNavigationBase : Microsoft.EntityFrameworkCore.Metadata.IConventionPropertyBase, Microsoft.EntityFrameworkCore.Metadata.INavigationBase
type IConventionNavigationBase = interface
    interface IReadOnlyNavigationBase
    interface IReadOnlyPropertyBase
    interface IReadOnlyAnnotatable
    interface IConventionPropertyBase
    interface IConventionAnnotatable
type IConventionNavigationBase = interface
    interface INavigationBase
    interface IPropertyBase
    interface IAnnotatable
    interface IConventionPropertyBase
    interface IConventionAnnotatable
Public Interface IConventionNavigationBase
Implements IConventionPropertyBase, IReadOnlyNavigationBase
Public Interface IConventionNavigationBase
Implements IConventionPropertyBase, INavigationBase
衍生
實作

備註

此介面用於模型建立時,允許修改元資料。 模型建構完成後,代表 IReadOnlyNavigationBase 同一元資料的唯讀視圖。

更多資訊與範例請參閱 模型建構慣例 。

屬性

名稱 Description
Builder

取得可用來配置此物件的建構工具。

(繼承來源 IConventionAnnotatable)
ClrType

取得這個類屬性物件所持有的值類型。

(繼承來源 IPropertyBase)
DeclaringEntityType
已淘汰.

取得該屬性所屬的實體類型。

(繼承來源 IPropertyBase)
DeclaringType

取得這個類性質物件所屬的類型。

(繼承來源 IPropertyBase)
FieldInfo

取得這個類屬性物件底層 CLR 欄位的 。FieldInfo 這可能是 null 為了陰影性質,或是當背景場未知時。

(繼承來源 IPropertyBase)
Inverse

會用反向導航。

(繼承來源 INavigationBase)
IsCollection

取得一個值,表示導航屬性是否為集合屬性。

(繼承來源 INavigationBase)
IsEagerLoaded

會取得一個值,指示此導航是否應該預設為急載。

(繼承來源 INavigationBase)
IsInModel

表示該物件是否在模型中,也就是尚未從模型中移除。

(繼承來源 IConventionAnnotatable)
IsShadowProperty

會得到一個值,表示這是否是影子屬性。 影子屬性是指在實體類別中沒有對應屬性的屬性。 屬性的當前值會儲存在實體 ChangeTracker 類別的實例中,而非儲存在實體類別的實例中。

(繼承來源 IPropertyBase)
Item[String]

取得帶有名稱的值註解,若不存在則回 null 傳。

(繼承來源 IAnnotatable)
LazyLoadingEnabled

判斷若啟用怠載且模型中已配置緩載機制,是否應進行此導航。

(繼承來源 IReadOnlyNavigationBase)
Name

取得這個類性質物件的名稱。

(繼承來源 IPropertyBase)
PropertyInfo

取得該類性質物件底層 CLR 屬性的 。PropertyInfo 這可能是 null 用於陰影屬性,或是直接映射到欄位。

(繼承來源 IPropertyBase)
Sentinel

取得哨兵值,表示此屬性未被設定。

(繼承來源 IReadOnlyPropertyBase)
TargetEntityType

取得這個導航屬性將承載實例的實體類型。

方法

名稱 Description
AddAnnotation(String, Object, Boolean)

為此物件新增註解。 如果已有指定名稱的註解存在,則會拋出。

(繼承來源 IConventionAnnotatable)
AddAnnotations(IEnumerable<IConventionAnnotation>, Boolean)

為物件添加註解。

(繼承來源 IConventionAnnotatable)
AddRuntimeAnnotation(String, Object)

為此物件新增執行時註解。 如果已有指定名稱的註解存在,則會拋出。

(繼承來源 IAnnotatable)
AnnotationsToDebugString(Int32)

取得物件上所有宣告註解的除錯字串。

(繼承來源 IReadOnlyAnnotatable)
FindAnnotation(String)

取得帶有名字的註解,若不存在則回 null 傳。

(繼承來源 IAnnotatable)
FindRuntimeAnnotation(String)

取得帶有名稱的執行時註解,若不存在則回 null 傳。

(繼承來源 IAnnotatable)
FindRuntimeAnnotationValue(String)

取得執行時註解的值,若名稱不存在則回 null 傳。

(繼承來源 IAnnotatable)
GetAnnotation(String)

取得帶有名稱的註解,若不存在則拋出。

(繼承來源 IConventionAnnotatable)
GetAnnotations()

取得目前物件的所有註解。

(繼承來源 IAnnotatable)
GetCollectionAccessor()

如果是集合導覽或複雜屬性,會取得 IClrCollectionAccessor 該屬性。

(繼承來源 IPropertyBase)
GetConfigurationSource()

回傳此屬性的配置來源。

(繼承來源 IConventionPropertyBase)
GetCurrentValueComparer()

比較追蹤條目中的數值IUpdateEntry會得到 aIComparer<T>。

(繼承來源 IPropertyBase)
GetFieldInfoConfigurationSource()

回傳 的 FieldInfo配置來源。

(繼承來源 IConventionPropertyBase)
GetFieldName()

取得該性質的背地名稱,或 null 若底盤不已知則得出。

(繼承來源 IReadOnlyPropertyBase)
GetGetter()

讀取該房產價值而獲得 A IClrPropertyGetter 。

(繼承來源 IPropertyBase)
GetIndex()

取得該物業的物業索引。

(繼承來源 IPropertyBase)
GetIsEagerLoadedConfigurationSource()

回傳 的 IsEagerLoaded配置來源。

GetLazyLoadingEnabledConfigurationSource()

回傳 的 LazyLoadingEnabled配置來源。

GetMemberInfo(Boolean, Boolean)

取得PropertyInfoFieldInfo或,應該用來取得或設定給定屬性的值。

(繼承來源 IPropertyBase)
GetOrAddRuntimeAnnotationValue<TValue,TArg>(String, Func<TArg,TValue>, TArg)

取得帶有名稱的執行時註解值,若不存在則加入該註解。

(繼承來源 IAnnotatable)
GetPropertyAccessMode()

這塊 PropertyAccessMode 地被用來做事。 null 表示正在使用預設屬性存取模式。

(繼承來源 IPropertyBase)
GetPropertyAccessModeConfigurationSource()

回傳 的 GetPropertyAccessMode()配置來源。

(繼承來源 IConventionPropertyBase)
GetRuntimeAnnotations()

取得目前物件上的所有執行時註解。

(繼承來源 IAnnotatable)
IsIndexerProperty()

會得到一個值,表示這是否屬於索引器屬性。 索引器屬性是指透過實體類別上的索引器存取的屬性。

(繼承來源 IReadOnlyPropertyBase)
RemoveAnnotation(String)

移除這個物件中帶有名字的註解。

(繼承來源 IConventionAnnotatable)
RemoveRuntimeAnnotation(String)

移除該物件中給定的執行時註解。

(繼承來源 IAnnotatable)
SetAnnotation(String, Object, Boolean)

設定以名字儲存的註解。 若已有指定名稱的註解存在,則會覆寫現有註解。

(繼承來源 IConventionAnnotatable)
SetField(FieldInfo, Boolean)
已淘汰.

設定該 FieldInfo 屬性應使用的底層 CLR 欄位。

預設情況下,如果找到或指定了後盾欄位,則在建構新物件時會使用,通常是在從資料庫查詢實體時。 所有其他進出通道皆使用物業。 此參數可透過呼叫 SetPropertyAccessMode(Nullable<PropertyAccessMode>, Boolean)來改變。

(繼承來源 IConventionPropertyBase)
SetField(String, Boolean)

設定該屬性應使用的底層 CLR 欄位。 這可能是 null 針對陰影屬性,或是該屬性的背景欄位未知。

(繼承來源 IConventionPropertyBase)
SetFieldInfo(FieldInfo, Boolean)

設定該 FieldInfo 屬性應使用的底層 CLR 欄位。

(繼承來源 IConventionPropertyBase)
SetIsEagerLoaded(Nullable<Boolean>, Boolean)

設定一個值,指示是否應該預設為急切載入。

SetIsLoadedWhenNoTracking(Object)

SetLoaded(Object, String, Boolean)當無追蹤查詢熱切載入此關係時,需要 a INavigationBase 標記為已載入。

(繼承來源 INavigationBase)
SetLazyLoadingEnabled(Nullable<Boolean>, Boolean)

設定一個值,指示若已啟用且已啟用延遲載入,是否應進行此導航。

SetOrRemoveAnnotation(String, Object, Boolean)

設定以名字儲存的註解。 若已有指定名稱的註解存在,則會覆寫現有註解。 若 null 提供 則移除現有註解。

(繼承來源 IConventionAnnotatable)
SetPropertyAccessMode(Nullable<PropertyAccessMode>, Boolean)

設定 使用 這個 PropertyAccessMode 屬性。

(繼承來源 IConventionPropertyBase)
SetRuntimeAnnotation(String, Object)

設定在指定鍵值下儲存的執行時註解。 若已有指定名稱的註解存在,則會覆寫現有註解。

(繼承來源 IAnnotatable)

明確介面實作

名稱 Description
IPropertyBase.GetPropertyAccessMode()

這塊 PropertyAccessMode 地被用來做事。 null 表示正在使用預設屬性存取模式。

(繼承來源 INavigationBase)
IReadOnlyPropertyBase.IsShadowProperty()

會得到一個值,表示這是否是影子屬性。 影子屬性是指在實體類別中沒有對應屬性的屬性。 屬性的當前值會儲存在實體 ChangeTracker 類別的實例中,而非儲存在實體類別的實例中。

(繼承來源 IReadOnlyNavigationBase)

擴充方法

名稱 Description
AddAnnotations(IConventionAnnotatable, IEnumerable<IConventionAnnotation>, Boolean)

為物件添加註解。

AnnotationsToDebugString(IAnnotatable, Int32)

取得物件上所有宣告註解的除錯字串。

GetAnnotation(IAnnotatable, String)

取得帶有名稱的註解,若不存在則拋出。

GetAnnotation(IConventionAnnotatable, String)

取得帶有名稱的註解,若不存在則拋出。

GetCurrentValueComparer(IPropertyBase)

比較追蹤條目中的數值IUpdateEntry會得到 aIComparer<T>。

GetFieldName(IPropertyBase)

取得該性質的背地名稱,或 null 若底盤不已知則得出。

GetGetter(IPropertyBase)

讀取該房產價值而獲得 A IClrPropertyGetter 。

請注意,若以此方法為陰影屬性IsShadowProperty(IPropertyBase)()呼叫是錯誤的,因為該性質沒有對應 MemberInfo。

GetIndex(IPropertyBase)

取得該物業的物業索引。

GetMemberInfo(IPropertyBase, Boolean, Boolean)

取得PropertyInfoFieldInfo或,應該用來取得或設定給定屬性的值。

請注意,若以此方法為陰影屬性IsShadowProperty(IPropertyBase)()呼叫是錯誤的,因為該性質沒有對應 MemberInfo。

GetPropertyAccessModeConfigurationSource(IConventionPropertyBase)

回傳 的 GetPropertyAccessMode()配置來源。

IsIndexerProperty(IPropertyBase)

會得到一個值,表示這是否屬於索引器屬性。 索引器屬性是指透過實體類別上的索引器存取的屬性。

IsShadowProperty(IPropertyBase)
已淘汰.

會得到一個值,表示這是否是影子屬性。 影子屬性是指在實體類別中沒有對應屬性的屬性。 屬性的當前值會儲存在實體 ChangeTracker 類別的實例中,而非儲存在實體類別的實例中。

SetField(IConventionPropertyBase, String, Boolean)

設定該屬性應使用的底層 CLR 欄位。 這可能是 null 針對陰影屬性,或是該屬性的背景欄位未知。

背襯場通常依約定方式求得,如下所述: http://go.microsoft.com/fwlink/?LinkId=723277. 此方法對於在慣例下找不到正確欄位時,明確設定支持欄位非常有用。

預設情況下,如果找到或指定了後盾欄位,則在建構新物件時會使用,通常是在從資料庫查詢實體時。 所有其他進出通道皆使用物業。 此參數可透過呼叫 SetPropertyAccessMode(IConventionPropertyBase, Nullable<PropertyAccessMode>, Boolean)來改變。

SetIsLoadedWhenNoTracking(INavigationBase, Object)

SetLoaded(Object, String, Boolean)當無追蹤查詢熱切載入此關係時,需要 a INavigationBase 標記為已載入。

SetOrRemoveAnnotation(IConventionAnnotatable, String, Object, Boolean)

設定以名字儲存的註解。 若已有指定名稱的註解存在,則會覆寫現有註解。 若 null 提供 則移除現有註解。

SetPropertyAccessMode(IConventionPropertyBase, Nullable<PropertyAccessMode>, Boolean)

設定 使用 這個 PropertyAccessMode 屬性。

適用於