語言

INavigationBase 介面

定義

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

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

備註

更多資訊與範例請參閱 建模實體類型與關係 。

屬性

名稱 Description
ClrType

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

(繼承來源 IReadOnlyPropertyBase)
DeclaringEntityType

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

DeclaringType

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

(繼承來源 IReadOnlyPropertyBase)
FieldInfo

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

(繼承來源 IReadOnlyPropertyBase)
Inverse

會用反向導航。

IsCollection

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

IsEagerLoaded

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

Item[String]

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

(繼承來源 IReadOnlyAnnotatable)
LazyLoadingEnabled

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

(繼承來源 IReadOnlyNavigationBase)
Name

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

(繼承來源 IReadOnlyPropertyBase)
PropertyInfo

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

(繼承來源 IReadOnlyPropertyBase)
Sentinel

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

(繼承來源 IReadOnlyPropertyBase)
TargetEntityType

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

方法

名稱 Description
AddRuntimeAnnotation(String, Object)

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

(繼承來源 IAnnotatable)
AnnotationsToDebugString(Int32)

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

(繼承來源 IReadOnlyAnnotatable)
FindAnnotation(String)

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

(繼承來源 IReadOnlyAnnotatable)
FindRuntimeAnnotation(String)

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

(繼承來源 IAnnotatable)
FindRuntimeAnnotationValue(String)

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

(繼承來源 IAnnotatable)
GetAnnotation(String)

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

(繼承來源 IReadOnlyAnnotatable)
GetAnnotations()

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

(繼承來源 IReadOnlyAnnotatable)
GetCollectionAccessor()

如果是集合式導覽,則取得 IClrCollectionAccessor 這個導覽屬性。

GetCurrentValueComparer()

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

(繼承來源 IPropertyBase)
GetFieldName()

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

(繼承來源 IReadOnlyPropertyBase)
GetGetter()

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

(繼承來源 IPropertyBase)
GetIndex()

取得該物業的物業索引。

(繼承來源 IPropertyBase)
GetMemberInfo(Boolean, Boolean)

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

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

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

(繼承來源 IAnnotatable)
GetPropertyAccessMode()

被 PropertyAccessMode 用來做這個類似性質的物件。

(繼承來源 IReadOnlyPropertyBase)
GetRuntimeAnnotations()

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

(繼承來源 IAnnotatable)
IsIndexerProperty()

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

(繼承來源 IReadOnlyPropertyBase)
IsShadowProperty()

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

(繼承來源 IReadOnlyPropertyBase)
RemoveRuntimeAnnotation(String)

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

(繼承來源 IAnnotatable)
SetIsLoadedWhenNoTracking(Object)

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

SetRuntimeAnnotation(String, Object)

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

(繼承來源 IAnnotatable)

明確介面實作

名稱 Description
IPropertyBase.GetPropertyAccessMode()

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

IReadOnlyPropertyBase.IsShadowProperty()

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

(繼承來源 IReadOnlyNavigationBase)

擴充方法

名稱 Description
AnnotationsToDebugString(IAnnotatable, Int32)

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

GetAnnotation(IAnnotatable, String)

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

GetCurrentValueComparer(IPropertyBase)

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

GetDefaultColumnMappings(IPropertyBase)

回傳屬性會映射到的預設欄位。

GetFieldName(IPropertyBase)

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

GetGetter(IPropertyBase)

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

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

GetIndex(IPropertyBase)

取得該物業的物業索引。

GetJsonElementMappings(IPropertyBase)

回傳此屬性的 JSON 元素映射。

GetMemberInfo(IPropertyBase, Boolean, Boolean)

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

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

GetPropertyAccessMode(IPropertyBase)

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

GetTableColumnMappings(IPropertyBase)

回傳該屬性所映射的表格欄位。

GetViewColumnMappings(IPropertyBase)

回傳該屬性所映射的檢視欄位。

IsIndexerProperty(IPropertyBase)

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

IsShadowProperty(IPropertyBase)
已淘汰.

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

SetIsLoadedWhenNoTracking(INavigationBase, Object)

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

適用於