IElementType 介面

定義

表示集合屬性的專案。

public interface IElementType : Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyElementType
type IElementType = interface
    interface IReadOnlyElementType
    interface IReadOnlyAnnotatable
    interface IAnnotatable
Public Interface IElementType
Implements IAnnotatable, IReadOnlyElementType
衍生
實作

備註

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

屬性

ClrType

集合中項目的類型。

(繼承來源 IReadOnlyElementType)
CollectionProperty

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

IsNullable

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

(繼承來源 IReadOnlyElementType)
Item[String]

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

(繼承來源 IReadOnlyAnnotatable)

方法

AddRuntimeAnnotation(String, Object)

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

(繼承來源 IAnnotatable)
AnnotationsToDebugString(Int32)

取得 物件上宣告之所有注釋的偵錯字串。

(繼承來源 IReadOnlyAnnotatable)
FindAnnotation(String)

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

(繼承來源 IReadOnlyAnnotatable)
FindRuntimeAnnotation(String)

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

(繼承來源 IAnnotatable)
FindRuntimeAnnotationValue(String)

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

(繼承來源 IAnnotatable)
FindTypeMapping()

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

(繼承來源 IReadOnlyElementType)
GetAnnotation(String)

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

(繼承來源 IReadOnlyAnnotatable)
GetAnnotations()

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

(繼承來源 IReadOnlyAnnotatable)
GetJsonValueReaderWriter()

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

(繼承來源 IReadOnlyElementType)
GetMaxLength()

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

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

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

(繼承來源 IAnnotatable)
GetPrecision()

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

(繼承來源 IReadOnlyElementType)
GetProviderClrType()

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

(繼承來源 IReadOnlyElementType)
GetRuntimeAnnotations()

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

(繼承來源 IAnnotatable)
GetScale()

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

(繼承來源 IReadOnlyElementType)
GetTypeMapping()

CoreTypeMapping從完成的模型傳回集合專案的 。

(繼承來源 IReadOnlyElementType)
GetValueComparer()

取得集合專案的自訂 ValueComparer

(繼承來源 IReadOnlyElementType)
GetValueConverter()

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

(繼承來源 IReadOnlyElementType)
IsUnicode()

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

(繼承來源 IReadOnlyElementType)
RemoveRuntimeAnnotation(String)

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

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

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

(繼承來源 IAnnotatable)
ToDebugString(MetadataDebugStringOptions, Int32)

建立人類可讀取的指定中繼資料標記法。

警告:不要依賴傳回字串的格式。 它專為偵錯而設計,而且可能會在發行之間任意變更。

(繼承來源 IReadOnlyElementType)

擴充方法

FindRelationalTypeMapping(IReadOnlyElementType)

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

GetRelationalTypeMapping(IReadOnlyElementType)

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

GetStoreType(IElementType)

傳回專案的資料庫類型。

GetStoreType(IReadOnlyElementType)

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

IsFixedLength(IReadOnlyElementType)

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

IsFixedLength(IReadOnlyElementType, StoreObjectIdentifier)

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

適用於