RuntimeElementType 類別

定義

表示集合屬性的專案。

public class RuntimeElementType : Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.IElementType
type RuntimeElementType = class
    inherit AnnotatableBase
    interface IElementType
    interface IReadOnlyElementType
    interface IReadOnlyAnnotatable
    interface IAnnotatable
Public Class RuntimeElementType
Inherits AnnotatableBase
Implements IElementType
繼承
RuntimeElementType
實作

備註

如需詳細資訊和範例,請參閱 模型化實體類型和關聯 性。

建構函式

RuntimeElementType(Type, RuntimeProperty, Boolean, Nullable<Int32>, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, Type, ValueConverter, ValueComparer, JsonValueReaderWriter, CoreTypeMapping)

這是支援 Entity Framework Core 基礎結構的內部 API,不受與公用 API 相同的相容性標準。 它可能會在任何版本中變更或移除,而不會有任何通知。 您應該只在程式碼中直接使用它,並知道這麼做可能會導致應用程式在更新至新的 Entity Framework Core 版本時失敗。

屬性

ClrType

集合中項目的類型。

CollectionProperty

取得這個 表示專案的集合屬性。

DebugView

這是支援 Entity Framework Core 基礎結構的內部 API,不受與公用 API 相同的相容性標準。 它可能會在任何版本中變更或移除,而不會有任何通知。 您應該只在程式碼中直接使用它,並知道這麼做可能會導致應用程式在更新至新的 Entity Framework Core 版本時失敗。

IsNullable

取得值,指出集合的專案是否可以是 null

IsReadOnly

指出目前物件是否為唯讀。

(繼承來源 AnnotatableBase)
Item[String]

取得具有指定名稱的值批註,如果不存在,則 null 傳回 。

(繼承來源 AnnotatableBase)

方法

AddAnnotation(String, Annotation)

將注釋加入至這個物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

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

將注釋加入至這個物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

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

將批註加入至這個 物件。

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

將批註加入至這個 物件。

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

將執行時間批註新增至這個 物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

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

將執行時間批註新增至這個 物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

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

將執行時間批註新增至這個 物件。

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

將執行時間批註新增至這個 物件。

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

建立新的批註。

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

建立新的執行時間批註。

(繼承來源 AnnotatableBase)
EnsureMutable()

如果模型是唯讀的,則會擲回 。

(繼承來源 AnnotatableBase)
EnsureReadOnly()

如果模型不是唯讀,則會擲回 。

(繼承來源 AnnotatableBase)
FindAnnotation(String)

取得具有指定名稱的注釋,如果不存在,則傳 null 回 。

(繼承來源 AnnotatableBase)
FindRuntimeAnnotation(String)

取得具有指定名稱的執行時間批註,如果不存在,則 null 傳回 。

(繼承來源 AnnotatableBase)
FindTypeMapping()

傳回集合專案的型別對應。

GetAnnotation(String)

取得具有指定名稱的注釋,如果不存在,則會擲回。

(繼承來源 AnnotatableBase)
GetAnnotations()

取得目前 物件上的所有批註。

(繼承來源 AnnotatableBase)
GetJsonValueReaderWriter()

取得要用於集合元素的 型 JsonValueReaderWriter<TValue> 別。

GetMaxLength()

取得集合元素中允許的資料長度上限。 例如,如果專案類型為 String ,則這是字元數上限。

GetOrAddRuntimeAnnotationValue<TValue,TArg>(String, Func<TArg,TValue>, TArg)

取得具有指定名稱的執行時間批註值,如果不存在,請加以新增。

(繼承來源 AnnotatableBase)
GetPrecision()

取得集合元素中允許的資料精確度。 例如,如果專案類型為 Decimal ,則這是數位數上限。

GetProviderClrType()

取得在傳送至資料庫提供者之前,集合的專案會轉換成的類型。

GetRuntimeAnnotations()

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

(繼承來源 AnnotatableBase)
GetScale()

取得集合的這個元素中允許的資料小數位數。 例如,如果專案類型為 Decimal ,則這是小數位數的最大數目。

GetValueComparer()

取得集合專案的自訂 ValueComparer

GetValueConverter()

取得集合中這個元素的自訂 ValueConverter

IsUnicode()

取得值,指出集合的專案是否可以保存 Unicode 字元。

OnAnnotationSet(String, Annotation, Annotation)

設定或移除注釋時呼叫。

(繼承來源 AnnotatableBase)
RemoveAnnotation(String)

從這個 物件中移除指定的批註。

(繼承來源 AnnotatableBase)
RemoveRuntimeAnnotation(String)

從這個 物件中移除指定的執行時間批註。

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

設定儲存在指定索引鍵底下的批註。 如果具有指定名稱的注釋已經存在,則會覆寫現有的批註。

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

設定儲存在指定索引鍵底下的批註。 如果具有指定名稱的注釋已經存在,則會覆寫現有的批註。

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

設定儲存在指定索引鍵底下的執行時間批註。 如果具有指定名稱的注釋已經存在,則會覆寫現有的批註。

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

設定儲存在指定索引鍵底下的執行時間批註。 如果具有指定名稱的注釋已經存在,則會覆寫現有的批註。

(繼承來源 AnnotatableBase)
ToString()

這是支援 Entity Framework Core 基礎結構的內部 API,不受與公用 API 相同的相容性標準。 它可能會在任何版本中變更或移除,而不會有任何通知。 您應該只在程式碼中直接使用它,並知道這麼做可能會導致應用程式在更新至新的 Entity Framework Core 版本時失敗。

明確介面實作

IAnnotatable.AddRuntimeAnnotation(String, Object)

將執行時間批註新增至這個 物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

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

取得具有指定名稱的執行時間批註,如果不存在,則 null 傳回 。

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

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

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

從這個 物件中移除指定的執行時間批註。

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

設定儲存在指定索引鍵底下的執行時間批註。 如果具有指定名稱的注釋已經存在,則會覆寫現有的批註。

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

取得具有指定名稱的注釋,如果不存在,則傳 null 回 。

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

取得目前 物件上的所有批註。

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

取得具有指定名稱之注釋的值,如果不存在,則傳 null 回 。

(繼承來源 AnnotatableBase)
IReadOnlyElementType.CollectionProperty

取得這個 表示專案的集合屬性。

IReadOnlyElementType.FindTypeMapping()

傳回集合專案的型別對應。

IReadOnlyElementType.GetMaxLength()

取得集合元素中允許的資料長度上限。 例如,如果專案類型為 String ,則這是字元數上限。

IReadOnlyElementType.GetPrecision()

取得集合元素中允許的資料精確度。 例如,如果專案類型為 Decimal ,則這是數位數上限。

IReadOnlyElementType.GetProviderClrType()

取得在傳送至資料庫提供者之前,集合的專案會轉換成的類型。

IReadOnlyElementType.GetScale()

取得集合的這個元素中允許的資料小數位數。 例如,如果專案類型為 Decimal ,則這是小數位數的最大數目。

IReadOnlyElementType.GetValueConverter()

取得集合中這個元素的自訂 ValueConverter

IReadOnlyElementType.IsNullable

取得值,指出集合的專案是否可以是 null

IReadOnlyElementType.IsUnicode()

取得值,指出集合的專案是否可以保存 Unicode 字元。

擴充方法

FindRelationalTypeMapping(IReadOnlyElementType)

RelationalTypeMapping 回已完成模型上指定專案的 。

GetRelationalTypeMapping(IReadOnlyElementType)

RelationalTypeMapping 回已完成模型上指定專案的 。

GetStoreType(IElementType)

傳回專案的資料庫類型。

GetStoreType(IReadOnlyElementType)

傳回元素的資料庫類型,如果找不到資料庫類型,則 null 傳回 。

IsFixedLength(IReadOnlyElementType)

傳回旗標,指出專案是否能夠只儲存固定長度的資料,例如字串。

IsFixedLength(IReadOnlyElementType, StoreObjectIdentifier)

傳回旗標,指出專案是否能夠只儲存固定長度的資料,例如字串。

適用於