IMutableElementType 介面

定義

表示集合屬性的專案。

public interface IMutableElementType : Microsoft.EntityFrameworkCore.Metadata.IMutableAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyElementType
type IMutableElementType = interface
    interface IReadOnlyElementType
    interface IReadOnlyAnnotatable
    interface IMutableAnnotatable
Public Interface IMutableElementType
Implements IMutableAnnotatable, IReadOnlyElementType
實作

備註

此介面會在模型建立期間使用,並允許修改中繼資料。 建置模型之後, IElementType 表示相同中繼資料的唯讀檢視。

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

屬性

ClrType

集合中項目的類型。

(繼承來源 IReadOnlyElementType)
CollectionProperty

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

IsNullable

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

Item[String]

取得或設定具有指定名稱之注釋的值。

(繼承來源 IMutableAnnotatable)

方法

AddAnnotation(String, Object)

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

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

將批註加入物件。

(繼承來源 IMutableAnnotatable)
AnnotationsToDebugString(Int32)

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

(繼承來源 IReadOnlyAnnotatable)
FindAnnotation(String)

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

(繼承來源 IMutableAnnotatable)
FindTypeMapping()

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

(繼承來源 IReadOnlyElementType)
GetAnnotation(String)

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

(繼承來源 IReadOnlyAnnotatable)
GetAnnotations()

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

(繼承來源 IMutableAnnotatable)
GetJsonValueReaderWriter()

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

(繼承來源 IReadOnlyElementType)
GetMaxLength()

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

(繼承來源 IReadOnlyElementType)
GetPrecision()

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

(繼承來源 IReadOnlyElementType)
GetProviderClrType()

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

(繼承來源 IReadOnlyElementType)
GetScale()

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

(繼承來源 IReadOnlyElementType)
GetTypeMapping()

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

(繼承來源 IReadOnlyElementType)
GetValueComparer()

取得集合專案的自訂 ValueComparer

(繼承來源 IReadOnlyElementType)
GetValueConverter()

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

(繼承來源 IReadOnlyElementType)
IsUnicode()

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

(繼承來源 IReadOnlyElementType)
RemoveAnnotation(String)

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

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

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

(繼承來源 IMutableAnnotatable)
SetIsUnicode(Nullable<Boolean>)

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

SetJsonValueReaderWriterType(Type)

設定 要用於集合元素的 型 JsonValueReaderWriter<TValue> 別。

SetMaxLength(Nullable<Int32>)

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

SetOrRemoveAnnotation(String, Object)

設定儲存在指定名稱底下的批註。 如果具有指定名稱的注釋已經存在,則會覆寫現有的批註。 如果 null 已提供,則會移除現有的批註。

(繼承來源 IMutableAnnotatable)
SetPrecision(Nullable<Int32>)

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

SetProviderClrType(Type)

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

SetScale(Nullable<Int32>)

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

SetTypeMapping(CoreTypeMapping)

CoreTypeMapping設定指定專案的 。

SetValueComparer(Type)

設定集合專案的自訂 ValueComparer

SetValueComparer(ValueComparer)

設定集合專案的自訂 ValueComparer

SetValueConverter(Type)

設定集合中這個元素的自訂 ValueConverter

SetValueConverter(ValueConverter)

設定集合中這個元素的自訂 ValueConverter

ToDebugString(MetadataDebugStringOptions, Int32)

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

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

(繼承來源 IReadOnlyElementType)

明確介面實作

IReadOnlyElementType.IsNullable

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

擴充方法

FindRelationalTypeMapping(IReadOnlyElementType)

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

GetRelationalTypeMapping(IReadOnlyElementType)

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

GetStoreType(IReadOnlyElementType)

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

IsFixedLength(IReadOnlyElementType)

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

IsFixedLength(IReadOnlyElementType, StoreObjectIdentifier)

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

SetIsFixedLength(IMutableElementType, Nullable<Boolean>)

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

SetStoreType(IMutableElementType, String)

設定專案的資料庫類型。

適用於