語言

RuntimePropertyBase 類別

定義

導航與屬性的基礎類型。

[System.Runtime.CompilerServices.Nullable(0)]
public abstract class RuntimePropertyBase : Microsoft.EntityFrameworkCore.Infrastructure.RuntimeAnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimePropertyBase
public abstract class RuntimePropertyBase : Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimePropertyBase
[System.Runtime.CompilerServices.Nullable(0)]
public abstract class RuntimePropertyBase : Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimePropertyBase
[<System.Runtime.CompilerServices.Nullable(0)>]
type RuntimePropertyBase = class
    inherit RuntimeAnnotatableBase
    interface IRuntimePropertyBase
    interface IPropertyBase
    interface IReadOnlyPropertyBase
    interface IReadOnlyAnnotatable
    interface IAnnotatable
type RuntimePropertyBase = class
    inherit AnnotatableBase
    interface IRuntimePropertyBase
    interface IPropertyBase
    interface IReadOnlyPropertyBase
    interface IReadOnlyAnnotatable
    interface IAnnotatable
[<System.Runtime.CompilerServices.Nullable(0)>]
type RuntimePropertyBase = class
    inherit AnnotatableBase
    interface IRuntimePropertyBase
    interface IPropertyBase
    interface IReadOnlyPropertyBase
    interface IReadOnlyAnnotatable
    interface IAnnotatable
Public MustInherit Class RuntimePropertyBase
Inherits RuntimeAnnotatableBase
Implements IRuntimePropertyBase
Public MustInherit Class RuntimePropertyBase
Inherits AnnotatableBase
Implements IRuntimePropertyBase
繼承
RuntimePropertyBase
繼承
RuntimePropertyBase
衍生
屬性
實作
IAnnotatable IReadOnlyAnnotatable Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimePropertyBase IPropertyBase IReadOnlyPropertyBase

備註

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

建構函式

名稱 Description
RuntimePropertyBase(String, PropertyInfo, FieldInfo, PropertyAccessMode)

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

屬性

名稱 Description
ClrType

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

DeclaringEntityType

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

DeclaringType

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

Indexes

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

IsCollection

會得到一個值,表示該屬性是否為集合。

IsReadOnly

表示目前物件是否為唯讀。

(繼承來源 AnnotatableBase)
Item[String]

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

(繼承來源 RuntimeAnnotatableBase)
Item[String]

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

(繼承來源 AnnotatableBase)
Name

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

Sentinel

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

方法

名稱 Description
AddAnnotation(String, Annotation)

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

(繼承來源 AnnotatableBase)
AddAnnotation(String, Object)

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

(繼承來源 RuntimeAnnotatableBase)
AddAnnotation(String, Object)

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

(繼承來源 AnnotatableBase)
AddAnnotations(IEnumerable<IAnnotation>)

為此物件新增註解,覆蓋任何同名的現有註解。

(繼承來源 RuntimeAnnotatableBase)
AddAnnotations(IEnumerable<IAnnotation>)

為此物件新增註解。

(繼承來源 AnnotatableBase)
AddAnnotations(IReadOnlyDictionary<String,Object>)

為此物件新增註解,覆蓋任何同名的現有註解。

(繼承來源 RuntimeAnnotatableBase)
AddAnnotations(IReadOnlyDictionary<String,Object>)

為此物件新增註解。

(繼承來源 AnnotatableBase)
AddRuntimeAnnotation(String, Annotation)

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

(繼承來源 RuntimeAnnotatableBase)
AddRuntimeAnnotation(String, Annotation)

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

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

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

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

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

(繼承來源 AnnotatableBase)
AddRuntimeAnnotations(IEnumerable<Annotation>)

為此物件新增執行時註解。

(繼承來源 RuntimeAnnotatableBase)
AddRuntimeAnnotations(IEnumerable<Annotation>)

為此物件新增執行時註解。

(繼承來源 AnnotatableBase)
AddRuntimeAnnotations(IReadOnlyDictionary<String,Object>)

為此物件新增執行時註解。

(繼承來源 RuntimeAnnotatableBase)
AddRuntimeAnnotations(IReadOnlyDictionary<String,Object>)

為此物件新增執行時註解。

(繼承來源 AnnotatableBase)
CreateAnnotation(String, Object)

建立新的註解。

(繼承來源 RuntimeAnnotatableBase)
CreateAnnotation(String, Object)

建立新的註解。

(繼承來源 AnnotatableBase)
CreateRuntimeAnnotation(String, Object)

建立新的執行時註解。

(繼承來源 RuntimeAnnotatableBase)
CreateRuntimeAnnotation(String, Object)

建立新的執行時註解。

(繼承來源 AnnotatableBase)
EnsureMutable()

如果模型是唯讀,則會拋出。

(繼承來源 AnnotatableBase)
EnsureReadOnly()

若模型非唯讀,則會擲出。

(繼承來源 AnnotatableBase)
FindAnnotation(String)

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

(繼承來源 RuntimeAnnotatableBase)
FindAnnotation(String)

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

(繼承來源 AnnotatableBase)
FindRuntimeAnnotation(String)

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

(繼承來源 RuntimeAnnotatableBase)
FindRuntimeAnnotation(String)

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

(繼承來源 AnnotatableBase)
GetAnnotation(String)

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

(繼承來源 RuntimeAnnotatableBase)
GetAnnotation(String)

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

(繼承來源 AnnotatableBase)
GetAnnotations()

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

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

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

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

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

(繼承來源 AnnotatableBase)
GetRuntimeAnnotations()

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

(繼承來源 RuntimeAnnotatableBase)
GetRuntimeAnnotations()

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

(繼承來源 AnnotatableBase)
OnAnnotationSet(String, Annotation, Annotation)

當註解被設定或移除時會被呼叫。

(繼承來源 AnnotatableBase)
RemoveAnnotation(String)

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

(繼承來源 RuntimeAnnotatableBase)
RemoveAnnotation(String)

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

(繼承來源 AnnotatableBase)
RemoveRuntimeAnnotation(String)

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

(繼承來源 RuntimeAnnotatableBase)
RemoveRuntimeAnnotation(String)

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

(繼承來源 AnnotatableBase)
SetAccessors(PropertyAccessors)

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

SetAccessors<TProperty>(Func<IInternalEntry,TProperty>, Func<IInternalEntry, TProperty>, Func<IInternalEntry,TProperty>, Func<IInternalEntry, TProperty>)

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

SetAccessors<TProperty>(Func<InternalEntityEntry,TProperty>, Func<InternalEntityEntry, TProperty>, Func<InternalEntityEntry,TProperty>, Func<InternalEntityEntry, TProperty>, Func<ValueBuffer,Object>)

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

SetAnnotation(String, Annotation, Annotation)

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

(繼承來源 AnnotatableBase)
SetAnnotation(String, Object)

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

(繼承來源 RuntimeAnnotatableBase)
SetAnnotation(String, Object)

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

(繼承來源 AnnotatableBase)
SetCurrentValueComparer(IComparer<IUpdateEntry>)

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

SetGetter<TEntity,TStructural,TValue>(Func<TEntity,IReadOnlyList<Int32>, TValue>, Func<TEntity,IReadOnlyList<Int32>,Boolean>, Func<TStructural, TValue>, Func<TStructural,Boolean>)

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

SetGetter<TEntity,TStructuralType,TValue>(Func<TEntity,TValue>, Func<TEntity,Boolean>, Func<TStructuralType,TValue>, Func<TStructuralType,Boolean>)

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

SetGetter<TEntity,TValue>(Func<TEntity,TValue>, Func<TEntity,Boolean>)

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

SetIndexedCollectionAccessor<TEntity,TCollection,TElement>(Func<TEntity, Int32,TElement>, Action<TEntity,Int32,TElement>, Action<TEntity, Int32,TElement>, Func<Int32,TCollection>)

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

SetMaterializationSetter<TEntity,TStructural,TValue>(Action<TEntity,IReadOnlyList<Int32>,TValue>, Func<TStructural,TValue,TStructural>)

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

SetMaterializationSetter<TEntity,TValue>(Action<TEntity,TValue>)

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

SetMaterializationSetter<TEntity,TValue>(Func<TEntity,TValue,TEntity>)

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

SetPropertyIndexes(Int32, Int32, Int32, Int32, Int32)

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

SetRuntimeAnnotation(String, Annotation, Annotation)

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

(繼承來源 RuntimeAnnotatableBase)
SetRuntimeAnnotation(String, Annotation, Annotation)

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

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

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

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

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

(繼承來源 AnnotatableBase)
SetSetter<TEntity,TStructural,TValue>(Action<TEntity,IReadOnlyList<Int32>,TValue>, Func<TStructural,TValue,TStructural>)

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

SetSetter<TEntity,TValue>(Action<TEntity,TValue>)

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

SetSetter<TEntity,TValue>(Func<TEntity,TValue,TEntity>)

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

明確介面實作

名稱 Description
IAnnotatable.AddRuntimeAnnotation(String, Object)

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

(繼承來源 RuntimeAnnotatableBase)
IAnnotatable.AddRuntimeAnnotation(String, Object)

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

(繼承來源 AnnotatableBase)
IAnnotatable.FindRuntimeAnnotation(String)

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

(繼承來源 RuntimeAnnotatableBase)
IAnnotatable.FindRuntimeAnnotation(String)

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

(繼承來源 AnnotatableBase)
IAnnotatable.GetRuntimeAnnotations()

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

(繼承來源 RuntimeAnnotatableBase)
IAnnotatable.GetRuntimeAnnotations()

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

(繼承來源 AnnotatableBase)
IAnnotatable.RemoveRuntimeAnnotation(String)

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

(繼承來源 RuntimeAnnotatableBase)
IAnnotatable.RemoveRuntimeAnnotation(String)

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

(繼承來源 AnnotatableBase)
IAnnotatable.SetRuntimeAnnotation(String, Object)

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

(繼承來源 RuntimeAnnotatableBase)
IAnnotatable.SetRuntimeAnnotation(String, Object)

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

(繼承來源 AnnotatableBase)
IPropertyBase.GetCurrentValueComparer()

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

IPropertyBase.GetGetter()

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

IReadOnlyAnnotatable.FindAnnotation(String)

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

(繼承來源 RuntimeAnnotatableBase)
IReadOnlyAnnotatable.FindAnnotation(String)

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

(繼承來源 AnnotatableBase)
IReadOnlyAnnotatable.GetAnnotations()

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

(繼承來源 RuntimeAnnotatableBase)
IReadOnlyAnnotatable.GetAnnotations()

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

(繼承來源 AnnotatableBase)
IReadOnlyAnnotatable.Item[String]

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

(繼承來源 RuntimeAnnotatableBase)
IReadOnlyAnnotatable.Item[String]

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

(繼承來源 AnnotatableBase)
IReadOnlyPropertyBase.ClrType

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

IReadOnlyPropertyBase.DeclaringType

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

IReadOnlyPropertyBase.FieldInfo

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

IReadOnlyPropertyBase.GetPropertyAccessMode()

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

IReadOnlyPropertyBase.PropertyInfo

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

IRuntimePropertyBase.Accessors

導航與屬性的基礎類型。

IRuntimePropertyBase.GetIndexedCollectionAccessor()

導航與屬性的基礎類型。

IRuntimePropertyBase.GetSetter()

導航與屬性的基礎類型。

IRuntimePropertyBase.MaterializationSetter

導航與屬性的基礎類型。

IRuntimePropertyBase.PropertyIndexes

導航與屬性的基礎類型。

IRuntimePropertyBase.Setter

導航與屬性的基礎類型。

擴充方法

名稱 Description
AnnotationsToDebugString(IAnnotatable, Int32)

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

GetCurrentValueComparer(IPropertyBase)

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

GetDefaultColumnMappings(IPropertyBase)

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

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 類別的實例中,而非儲存在實體類別的實例中。

適用於