IConventionElementType 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
表示集合屬性的專案。
public interface IConventionElementType : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyElementType
type IConventionElementType = interface
interface IReadOnlyElementType
interface IReadOnlyAnnotatable
interface IConventionAnnotatable
Public Interface IConventionElementType
Implements IConventionAnnotatable, IReadOnlyElementType
- 實作
備註
此介面會在模型建立期間使用,並允許修改中繼資料。 建置模型之後, IElementType 表示相同中繼資料的唯讀檢視。
如需詳細資訊和範例,請參閱 模型建置慣例 。
屬性
Builder |
取得可用來設定這個專案的產生器。 |
ClrType |
集合中項目的類型。 (繼承來源 IReadOnlyElementType) |
CollectionProperty |
取得這個 表示專案的集合屬性。 |
IsInModel |
指出這個物件是否在模型中,亦即尚未從其中一個物件中移除。 (繼承來源 IConventionAnnotatable) |
IsNullable |
取得值,指出集合的專案是否可以是 |
Item[String] |
取得具有指定名稱之注釋的值,如果不存在,則傳 |
方法
擴充方法
FindRelationalTypeMapping(IReadOnlyElementType) |
傳 RelationalTypeMapping 回已完成模型上指定專案的 。 |
GetIsFixedLengthConfigurationSource(IConventionElementType) |
取得 的 ConfigurationSourceIsFixedLength(IReadOnlyElementType) 。 |
GetRelationalTypeMapping(IReadOnlyElementType) |
傳 RelationalTypeMapping 回已完成模型上指定專案的 。 |
GetStoreType(IReadOnlyElementType) |
傳回元素的資料庫類型,如果找不到資料庫類型,則 |
GetStoreTypeConfigurationSource(IConventionElementType) |
ConfigurationSource取得資料庫類型的 。 |
IsFixedLength(IReadOnlyElementType) |
傳回旗標,指出專案是否能夠只儲存固定長度的資料,例如字串。 |
IsFixedLength(IReadOnlyElementType, StoreObjectIdentifier) |
傳回旗標,指出專案是否能夠只儲存固定長度的資料,例如字串。 |
SetIsFixedLength(IConventionElementType, Nullable<Boolean>, Boolean) |
設定旗標,指出專案是否能夠只儲存固定長度的資料,例如字串。 |
SetStoreType(IConventionElementType, String, Boolean) |
設定專案的資料庫類型。 |