語言

IConventionModel 介面

定義

關於實體形狀、彼此關係,以及它們如何映射到資料庫的元資料。 模型通常是透過覆寫 OnModelCreating(ModelBuilder) 導出 DbContext的方法來建立的。

[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("ReflectionAnalysis", "IL2072", Justification="TODO")]
public interface IConventionModel : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyModel
public interface IConventionModel : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IModel
public interface IConventionModel : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyModel
[<System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("ReflectionAnalysis", "IL2072", Justification="TODO")>]
type IConventionModel = interface
    interface IReadOnlyModel
    interface IReadOnlyAnnotatable
    interface IConventionAnnotatable
type IConventionModel = interface
    interface IModel
    interface IAnnotatable
    interface IConventionAnnotatable
type IConventionModel = interface
    interface IReadOnlyModel
    interface IReadOnlyAnnotatable
    interface IConventionAnnotatable
Public Interface IConventionModel
Implements IConventionAnnotatable, IReadOnlyModel
Public Interface IConventionModel
Implements IConventionAnnotatable, IModel
屬性
實作

備註

此介面用於模型建立時,允許修改元資料。 模型建構完成後,代表 IModel 同一元資料的唯讀視圖。

更多資訊與範例請參閱 模型建構慣例 。

屬性

名稱 Description
Builder

取得可用來配置此模型的建構工具。

IsInModel

表示該物件是否在模型中,也就是尚未從模型中移除。

(繼承來源 IConventionAnnotatable)
Item[String]

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

(繼承來源 IAnnotatable)
ModelDependencies

執行時服務的相依關係。

(繼承來源 IModel)
ModelId

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

(繼承來源 IReadOnlyModel)

方法

名稱 Description
AddAnnotation(String, Object, Boolean)

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

(繼承來源 IConventionAnnotatable)
AddAnnotations(IEnumerable<IConventionAnnotation>, Boolean)

為物件添加註解。

(繼承來源 IConventionAnnotatable)
AddEntityType(String, Boolean)

為模型新增一個預設類型的狀態實體類型。

AddEntityType(String, String, IConventionEntityType, Boolean)
已淘汰.

為模型新增一個擁有實體類型,並帶有定義導覽。

AddEntityType(String, Type, Boolean)

為模型新增一個共享型態實體型別。

AddEntityType(Type, Boolean)

為模型新增一個實體類型。

AddEntityType(Type, String, IConventionEntityType, Boolean)
已淘汰.

為模型新增一個擁有實體類型,並帶有定義導覽。

AddIgnored(String, Boolean)

標記給定的實體類型名稱為忽略。

AddIgnored(Type, Boolean)

標記給定的實體類型為忽略。

AddOwned(Type, Boolean)

標記該實體類型為擁有,表示發現該類型實體類型時應設定為擁有。

AddOwnedEntityType(String, Boolean)

為模型新增預設類型的擁有實體類型。

AddOwnedEntityType(String, Type, Boolean)

在模型中新增一個擁有的共享類型實體類型。

AddOwnedEntityType(Type, Boolean)

為模型新增一個擁有實體類型。

AddRuntimeAnnotation(String, Object)

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

(繼承來源 IAnnotatable)
AddShared(Type, Boolean)

標記該實體類型為共享,表示發現匹配實體類型時應配置為共享類型實體類型。

AnnotationsToDebugString(Int32)

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

(繼承來源 IReadOnlyAnnotatable)
DelayConventions()

防止當中繼資料面向被修改時,慣例無法立即執行。 所有延遲的慣例會在回傳物件被處置後執行。

FinalizeModel()

強制後處理模型,使其在執行時即可使用。 當使用 OnModelCreating(ModelBuilder);此方法允許在無法自動執行的情況下明確執行後處理。

FindAnnotation(String)

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

(繼承來源 IAnnotatable)
FindEntityType(String, String, IConventionEntityType)

取得名稱的實體類型,定義導航名稱及定義實體類型。 若未找到匹配實體類型,則回傳 null 。

FindEntityType(String, String, IEntityType)

取得名稱的實體類型,定義導航名稱及定義實體類型。 若未找到匹配實體類型,則回傳 null 。

(繼承來源 IModel)
FindEntityType(String, String, IReadOnlyEntityType)

取得給定基底名稱的實體類型,定義導航名稱及定義實體類型。 若未找到匹配實體類型,則回傳 null 。

(繼承來源 IReadOnlyModel)
FindEntityType(String)

取得帶有名字的實體。 若未找到帶有該名稱的實體類型,或該 CLR 類型被共用類型實體類型使用,或該實體類型有定義導覽,則回傳 null 。

FindEntityType(Type, String, IConventionEntityType)

取得名稱的實體類型,定義導航名稱及定義實體類型。 若未找到匹配實體類型,則回傳 null 。

FindEntityType(Type, String, IEntityType)

取得名稱的實體類型,定義導航名稱及定義實體類型。 若未找到匹配實體類型,則回傳 null 。

(繼承來源 IModel)
FindEntityType(Type, String, IReadOnlyEntityType)

取得該類型實體類型,定義導航名稱及定義實體類型。 若未找到匹配實體類型,則回傳 null 。

(繼承來源 IReadOnlyModel)
FindEntityType(Type)

取得映射該實體類別的實體。 若未找到帶有該名稱的實體類型,則回傳 null 。

FindEntityTypes(Type)

取得與該類型相符的實體類型。

FindIgnoredConfigurationSource(String)

表示是否忽略給定的實體類型名稱。

FindIgnoredConfigurationSource(Type)

表示是否忽略該實體類型。

FindIsOwnedConfigurationSource(Type)

若指定類型標記為擁有,則回傳配置來源。

FindIsSharedConfigurationSource(Type)

若指定類型被標記為共享,則回傳配置來源。

FindLeastDerivedEntityTypes(Type, Func<IReadOnlyEntityType,Boolean>)

回傳對應給定類型中最微導型態的實體類型。

FindRuntimeAnnotation(String)

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

(繼承來源 IAnnotatable)
FindRuntimeAnnotationValue(String)

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

(繼承來源 IAnnotatable)
FindRuntimeEntityType(Type)

取得映射給定實體類別的實體,該類別可能是由實際實體類型衍生的代理。 若未找到具有相同 CLR 類型的實體類型,或該 CLR 類型被共用類型實體類型使用,或該實體類型具有定義導覽,則回傳 null 。

(繼承來源 IModel)
FindTypeMappingConfiguration(Type)

求出給定標量 Type的約定前配置。

(繼承來源 IModel)
GetAnnotation(String)

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

(繼承來源 IConventionAnnotatable)
GetAnnotations()

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

(繼承來源 IAnnotatable)
GetChangeTrackingStrategy()

取得模型中實體所使用的預設變更追蹤策略。 此策略顯示上下文如何偵測某個實體類型實例的屬性變更。

(繼承來源 IReadOnlyModel)
GetChangeTrackingStrategyConfigurationSource()

回傳 的 GetChangeTrackingStrategy()配置來源。

GetEmbeddedDiscriminatorName()

它獲得了名稱,用於 JSON 文件中嵌入的判別符屬性。 預設是「$type」。

(繼承來源 IReadOnlyModel)
GetEmbeddedDiscriminatorNameConfigurationSource()

回傳 的 GetEmbeddedDiscriminatorName()配置來源。

GetEntityTypes()

它會取得模型中定義的所有實體類型。

GetModelDependencies()

取得執行時服務的依賴性。

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

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

(繼承來源 IAnnotatable)
GetProductVersion()

用來組裝這個模型的 EF Core 組合版本。

(繼承來源 IReadOnlyModel)
GetPropertyAccessMode()

因此,該 PropertyAccessMode 模型中用於實體類型的屬性。

(繼承來源 IReadOnlyModel)
GetPropertyAccessModeConfigurationSource()

回傳 的 GetPropertyAccessMode()配置來源。

GetRuntimeAnnotations()

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

(繼承來源 IAnnotatable)
GetTypeMappingConfigurations()

能取得所有會議前的配置。

(繼承來源 IModel)
IsIgnored(String)

表示是否忽略給定的實體類型名稱。

IsIgnored(Type)

表示是否忽略該實體類型。

IsIgnoredType(Type)

指示是否應忽略具有該類型的特定實體類型與屬性。 此配置獨立於 IsIgnored(Type)

IsIndexerMethod(MethodInfo)

會得到一個值,表示給定 MethodInfo 的是否代表索引器存取。

(繼承來源 IModel)
IsOwned(Type)

回傳一個值,指示使用該類型實體類型時是否應被設定為擁有型別。

IsShared(Type)

判斷模型中共享型態實體是否使用CLR型別。

RemoveAnnotation(String)

移除這個物件中帶有名字的註解。

(繼承來源 IConventionAnnotatable)
RemoveEntityType(IConventionEntityType)

從模型中移除一個實體類型。

RemoveEntityType(String, String, IConventionEntityType)

移除具有該類型、定義導航名稱及定義實體類型的實體類型。

RemoveEntityType(String)

從模型中移除一個沒有定義導航的實體類型。

RemoveEntityType(Type, String, IConventionEntityType)

移除具有該類型、定義導航名稱及定義實體類型的實體類型。

RemoveEntityType(Type)

從模型中移除一個實體類型。

RemoveIgnored(String)

移除忽略的實體類型名稱。

RemoveOwned(Type)

移除給定的擁有型別,表示發現匹配的實體型別不應被設定為擁有型。

RemoveRuntimeAnnotation(String)

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

(繼承來源 IAnnotatable)
RemoveShared(Type)

標記該類型為未共享,表示發現匹配實體類型時不應被設定為共享類型實體類型。

SetAnnotation(String, Object, Boolean)

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

(繼承來源 IConventionAnnotatable)
SetChangeTrackingStrategy(Nullable<ChangeTrackingStrategy>, Boolean)

設定模型中實體的預設變更追蹤策略。 此策略顯示上下文如何偵測某個實體類型實例的屬性變更。

SetEmbeddedDiscriminatorName(String, Boolean)

設定名稱用於嵌入 JSON 文件中的判別符屬性。 預設是「$type」。

SetOrRemoveAnnotation(String, Object, Boolean)

設定以名字儲存的註解。 若已有指定名稱的註解存在,則會覆寫現有註解。 若 null 提供 則移除現有註解。

(繼承來源 IConventionAnnotatable)
SetPropertyAccessMode(Nullable<PropertyAccessMode>, Boolean)

設定 以 PropertyAccessMode 作為該模型中所有實體類型的屬性的使用。

SetRuntimeAnnotation(String, Object)

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

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

建立給定元資料的可讀表示法。

警告:請勿依賴回傳字串的格式。 它僅設計用於除錯,且可能在不同版本間任意變動。

(繼承來源 IReadOnlyModel)

擴充方法

名稱 Description
AddAnnotations(IConventionAnnotatable, IEnumerable<IConventionAnnotation>, Boolean)

為物件添加註解。

AddDbFunction(IConventionModel, MethodInfo, Boolean)

建立一個映射到指定方法的函式。

AddDbFunction(IConventionModel, String, Type, Boolean)

建立一個函式。

AddFullTextCatalog(IConventionModel, String, Boolean)

為模型新增全文目錄。

AddIgnored(IConventionModel, Type, Boolean)

標記給定的實體類型為忽略。

AddOwned(IConventionModel, Type, Boolean)

標記該實體類型為擁有,表示發現該類型實體類型時應設定為擁有。

AddSequence(IConventionModel, String, String, Boolean)

要麼回傳 IMutableSequence 給定結構中已有的名稱,要麼建立一個包含該名稱與結構的新序列。

AddShared(IConventionModel, Type, Boolean)

標記該實體類型為共享,表示發現匹配實體類型時應配置為共享類型實體類型。

AnnotationsToDebugString(IAnnotatable, Int32)

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

AreNamedDefaultConstraintsUsed(IReadOnlyModel)

回傳是否應使用命名預設約束的值。

FinalizeModel(IConventionModel)

強制後處理模型,使其在執行時即可使用。 此後處理會在使用 OnModelCreating(ModelBuilder)時自動執行;此方法允許在無法自動執行的情況下明確執行。

FindDbFunction(IConventionModel, MethodInfo)

找到一個映射到由給定 MethodInfo方法所代表的方法的函數。

FindDbFunction(IConventionModel, String)

找到一個映射到該名稱所代表方法的函數。

FindDbFunction(IModel, MethodInfo)

找到一個映射到由給定 MethodInfo方法所代表的方法的函數。

FindDbFunction(IModel, String)

找到一個映射到該名稱所代表方法的函數。

FindDbFunction(IReadOnlyModel, MethodInfo)

找到一個映射到由給定 MethodInfo方法所代表的方法的函數。

FindDbFunction(IReadOnlyModel, String)

找到一個映射到該名稱所代表方法的函數。

FindEntityType(IConventionModel, Type, String, IConventionEntityType)

取得名稱的實體類型,定義導航名稱及定義實體類型。 若未找到匹配實體類型,則回傳 null 。

FindEntityType(IConventionModel, Type)

取得映射該實體類別的實體。 若未找到帶有該名稱的實體類型,則回傳 null 。

FindEntityType(IModel, Type, String, IEntityType)

取得該類型實體類型,定義導航名稱及定義實體類型。 若未找到匹配實體類型,則回傳 null 。

FindEntityType(IModel, Type)
已淘汰.

取得映射該實體類別的實體。 若未找到具有相同 CLR 類型的實體類型,或該 CLR 類型被共用類型實體類型使用,或該實體類型具有定義導覽,則回傳 null 。

FindFullTextCatalog(IConventionModel, String)

在模型中找到全文目錄,或若未找到則返回 null 。

FindFullTextCatalog(IReadOnlyModel, String)

在模型中找到全文目錄,或若未找到則返回 null 。

FindIgnoredConfigurationSource(IConventionModel, Type)

表示是否忽略該實體類型。

FindIsOwnedConfigurationSource(IConventionModel, Type)

回傳一個值,指示使用該類型實體類型時是否應被設定為擁有型別。

FindLeastDerivedEntityTypes(IConventionModel, Type, Func<IConventionEntityType,Boolean>)

回傳對應給定中最微導型態的實體類型。

FindRuntimeEntityType(IModel, Type)

取得映射給定實體類別的實體,該類別可能是由實際實體類型衍生的代理。 若未找到具有相同 CLR 類型的實體類型,或該 CLR 類型被共用類型實體類型使用,或該實體類型具有定義導覽,則回傳 null 。

FindSequence(IConventionModel, String, String)

找到一個帶有該名稱的序列。

FindSequence(IModel, String, String)

找到一個帶有該名稱的序列。

FindSequence(IReadOnlyModel, String, String)

找到一個帶有該名稱的序列。

GetAnnotation(IAnnotatable, String)

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

GetAnnotation(IConventionAnnotatable, String)

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

GetChangeTrackingStrategy(IModel)

取得模型中實體所使用的預設變更追蹤策略。 此策略顯示上下文如何偵測某個實體類型實例的屬性變更。

GetChangeTrackingStrategyConfigurationSource(IConventionModel)

回傳 的 GetChangeTrackingStrategy(IModel)配置來源。

GetCollation(IModel)

回傳資料庫的彙整。

GetCollation(IReadOnlyModel)

回傳資料庫的彙整。

GetCollationConfigurationSource(IConventionModel)

回傳彙整的配置來源。

GetDatabaseMaxSize(IModel)

回傳資料庫的最大大小。

GetDatabaseMaxSize(IReadOnlyModel)

回傳資料庫的最大大小。

GetDatabaseMaxSizeConfigurationSource(IConventionModel)

回傳資料庫最大大小的 。ConfigurationSource

GetDbFunctions(IConventionModel)

回傳模型中所有函數。

GetDbFunctions(IModel)

回傳模型中所有函數。

GetDbFunctions(IReadOnlyModel)

回傳模型中所有函數。

GetDefaultContainer(IModel)

會回傳預設容器名稱。

GetDefaultContainer(IReadOnlyModel)

會回傳預設容器名稱。

GetDefaultContainerConfigurationSource(IConventionModel)

回傳預設容器名稱的設定來源。

GetDefaultFullTextSearchLanguage(IReadOnlyModel)

在資料庫範圍內回傳全文搜尋的預設語言。

GetDefaultFullTextSearchLanguageConfigurationSource(IConventionModel)

在資料庫範圍內取得預設全文搜尋語言的 。ConfigurationSource

GetDefaultSchema(IModel)

回傳模型的預設架構,或 null 若未設定預設結構。

GetDefaultSchema(IReadOnlyModel)

回傳模型的預設架構,或 null 若未設定預設結構。

GetDefaultSchemaConfigurationSource(IConventionModel)

回傳預設結構的設定來源。

GetDiscriminatorInKey(IReadOnlyModel)

回傳一個值,指示實體類型判別器是否應包含在 JSON 的「id」值中。 在 EF Core 9 之前,它一直都包含在內。 從 EF Core 9 開始,預設不包含此功能。

GetDiscriminatorInKeyConfigurationSource(IConventionModel)

得到 ConfigurationSource 的 GetDiscriminatorInKey(IReadOnlyModel)。

GetEntityTypes(IConventionModel, String)
已淘汰.

取得與名字相符的實體類型。

GetEntityTypes(IConventionModel, Type)
已淘汰.

取得與該類型相符的實體類型。

GetEntityTypes(IModel, String)
已淘汰.

取得與名字相符的實體類型。

GetEntityTypes(IModel, Type)
已淘汰.

取得與該類型相符的實體類型。

GetFullTextCatalogs(IConventionModel)

取得模型中定義的所有全文目錄。

GetFullTextCatalogs(IReadOnlyModel)

取得模型中定義的所有全文目錄。

GetHasShadowIds(IReadOnlyModel)

回傳一個值,表示是否可以從目前的組態來源設定「__id」屬性的設定中設定

GetHasShadowIdsConfigurationSource(IConventionModel)

得到 ConfigurationSource 的 GetHasShadowIds(IReadOnlyModel)。

GetHiLoSequenceName(IModel)

回傳名稱以用於預設 hi-lo 序列。

GetHiLoSequenceName(IReadOnlyModel)

回傳名稱以用於預設 hi-lo 序列。

GetHiLoSequenceNameConfigurationSource(IConventionModel)

回傳預設 hi-lo 序列名稱的 。ConfigurationSource

GetHiLoSequenceSchema(IModel)

回傳結構以用於預設 hi-lo 序列。 UseHiLo(PropertyBuilder, String, String)

GetHiLoSequenceSchema(IReadOnlyModel)

回傳結構以用於預設 hi-lo 序列。 UseHiLo(PropertyBuilder, String, String)

GetHiLoSequenceSchemaConfigurationSource(IConventionModel)

回傳 ConfigurationSource 預設 hi-lo 序列結構。

GetIdentityIncrement(IModel)

回傳預設的身份遞增。

GetIdentityIncrement(IReadOnlyModel)

回傳預設的身份遞增。

GetIdentityIncrementConfigurationSource(IConventionModel)

回傳 ConfigurationSource 預設身份增量。

GetIdentitySeed(IModel)

回傳預設的身份種子。

GetIdentitySeed(IReadOnlyModel)

回傳預設的身份種子。

GetIdentitySeedConfigurationSource(IConventionModel)

會回傳預設架構的 。ConfigurationSource

GetMaxIdentifierLength(IModel)

回傳儲存識別碼允許的最大長度。

GetMaxIdentifierLength(IReadOnlyModel)

回傳儲存識別碼允許的最大長度。

GetMaxIdentifierLengthConfigurationSource(IConventionModel)

回傳 的 GetMaxIdentifierLength(IReadOnlyModel)配置來源。

GetPerformanceLevelSql(IModel)

回傳資料庫的效能等級。

GetPerformanceLevelSql(IReadOnlyModel)

回傳資料庫的效能等級。

GetPerformanceLevelSqlConfigurationSource(IConventionModel)

回傳資料庫效能等級的 。ConfigurationSource

GetProductVersion(IModel)

用來組裝這個模型的 EF Core 組合版本

GetPropertyAccessMode(IModel)

因此,該 PropertyAccessMode 模型中用於實體類型的屬性。

請注意,個別實體類型可以覆寫此存取模式,而實體類型的個別屬性也能覆蓋該實體類型設定的存取模式。 此處回傳的價值將用於任何未指定覆蓋的財產。

GetPropertyAccessModeConfigurationSource(IConventionModel)

回傳 的 GetPropertyAccessMode(IModel)配置來源。

GetRelationalModel(IModel)

回傳資料庫模型。

GetSequenceNameSuffix(IReadOnlyModel)

回傳後綴,將後綴加到自動建立序列的名稱後。

GetSequenceNameSuffixConfigurationSource(IConventionModel)

回傳 ConfigurationSource 預設值產生序列名稱後綴。

GetSequences(IConventionModel)

回傳模型中包含的所有序列。

GetSequences(IModel)

回傳模型中包含的所有序列。

GetSequences(IReadOnlyModel)

回傳模型中包含的所有序列。

GetSequenceSchema(IReadOnlyModel)

回傳用於預設值產生序列的結構。 UseSequence(PropertyBuilder, String, String)

GetSequenceSchemaConfigurationSource(IConventionModel)

回傳 ConfigurationSource 預設的鍵值產生序列結構。

GetServiceTierSql(IModel)

回傳資料庫的服務層級。

GetServiceTierSql(IReadOnlyModel)

回傳資料庫的服務層級。

GetServiceTierSqlConfigurationSource(IConventionModel)

回傳資料庫服務層級的 。ConfigurationSource

GetThroughput(IReadOnlyModel)

回傳資料庫範圍內的配置吞吐量。

GetThroughputConfigurationSource(IConventionModel)

在資料庫範圍內取得已配置吞吐量的 。ConfigurationSource

GetValueGenerationStrategy(IModel)

回傳 SqlServerValueGenerationStrategy 來表示模型中鍵的屬性,除非該屬性有明確設定的策略。

GetValueGenerationStrategy(IReadOnlyModel)

回傳 SqlServerValueGenerationStrategy 來表示模型中鍵的屬性,除非該屬性有明確設定的策略。

GetValueGenerationStrategyConfigurationSource(IConventionModel)

回傳 , ConfigurationSource 為預設 SqlServerValueGenerationStrategy。

HasEntityTypeWithDefiningNavigation(IModel, String)
已淘汰.

取得一個值,表示模型是否包含對應的實體類型及定義導覽。

HasEntityTypeWithDefiningNavigation(IModel, Type)
已淘汰.

取得一個值,表示模型是否包含對應的實體類型及定義導覽。

IsIgnored(IConventionModel, String)

表示是否忽略給定的實體類型名稱。

IsIgnored(IConventionModel, Type)

表示是否忽略該實體類型。

IsIndexerMethod(IModel, MethodInfo)

會取得一個值,表示該方法資訊是否曾向索引器存取。

IsOwned(IConventionModel, Type)

回傳一個值,指示使用該類型實體類型時是否應被設定為擁有型別。

IsShared(IModel, Type)

判斷模型中共享型態實體是否使用CLR型別。

RemoveDbFunction(IConventionModel, MethodInfo)

移除映射到由給定 MethodInfo方法所代表的函數。

RemoveDbFunction(IConventionModel, String)

移除映射到由給定 MethodInfo方法所代表的函數。

RemoveEntityType(IConventionModel, String, String, IConventionEntityType)

從模型中移除具有定義導覽的實體類型。

RemoveEntityType(IConventionModel, String)

從模型中移除一個沒有定義導航的實體類型。

RemoveEntityType(IConventionModel, Type, String, IConventionEntityType)

從模型中移除具有定義導覽的實體類型。

RemoveEntityType(IConventionModel, Type)

從模型中移除一個實體類型。

RemoveFullTextCatalog(IConventionModel, String)

移除模型中的全文目錄。

RemoveOwned(IConventionModel, Type)

移除給定的擁有型別,表示發現匹配的實體型別不應被設定為擁有型。

RemoveSequence(IConventionModel, String, String)

移除帶有名字的 。IConventionSequence

SetChangeTrackingStrategy(IConventionModel, Nullable<ChangeTrackingStrategy>, Boolean)

設定模型中實體的預設變更追蹤策略。 此策略顯示上下文如何偵測某個實體類型實例的屬性變更。

SetCollation(IConventionModel, String, Boolean)

設定資料庫的整合。

SetDatabaseMaxSize(IConventionModel, String, Boolean)

設定資料庫的最大容量。

SetDefaultContainer(IConventionModel, String, Boolean)

設定預設容器名稱。

SetDefaultFullTextSearchLanguage(IConventionModel, String, Boolean)

設定資料庫範圍的全文搜尋預設語言。

SetDefaultSchema(IConventionModel, String, Boolean)

設定預設架構。

SetDiscriminatorInKey(IConventionModel, Nullable<IdDiscriminatorMode>, Boolean)

在 JSON 「id」中包含實體類型判別器。

SetHasShadowIds(IConventionModel, Nullable<Boolean>, Boolean)

強制模型建置時必須建立一個映射到 JSON 「id」的「__id」陰影屬性。 這是 EF Core 9.0 之前的預設行為。

SetHiLoSequenceName(IConventionModel, String, Boolean)

設定名稱作為預設 hi-lo 序列的使用。

SetHiLoSequenceSchema(IConventionModel, String, Boolean)

設定預設 hi-lo 序列的結構。

SetIdentityIncrement(IConventionModel, Nullable<Int32>, Boolean)

設定預設的身份增量。

SetIdentitySeed(IConventionModel, Nullable<Int32>, Boolean)

設定預設的身份種子。

SetIdentitySeed(IConventionModel, Nullable<Int64>, Boolean)

設定預設的身份種子。

SetMaxIdentifierLength(IConventionModel, Nullable<Int32>, Boolean)

設定商店識別碼允許的最大長度。

SetOrRemoveAnnotation(IConventionAnnotatable, String, Object, Boolean)

設定以名字儲存的註解。 若已有指定名稱的註解存在,則會覆寫現有註解。 若 null 提供 則移除現有註解。

SetPerformanceLevelSql(IConventionModel, String, Boolean)

設定資料庫的效能等級。

SetPropertyAccessMode(IConventionModel, Nullable<PropertyAccessMode>, Boolean)

設定 以 PropertyAccessMode 作為該模型中所有實體類型的屬性的使用。

請注意,個別實體類型可以覆寫此存取模式,而實體類型的個別屬性也能覆蓋該實體類型設定的存取模式。 此處設定的值將用於任何未指定覆寫的屬性。

SetSequenceNameSuffix(IConventionModel, String, Boolean)

將後綴設定為附加在自動建立序列名稱後。

SetSequenceSchema(IConventionModel, String, Boolean)

設定結構以用於預設的鍵值產生序列。

SetServiceTierSql(IConventionModel, String, Boolean)

設定資料庫的服務層級。

SetThroughput(IConventionModel, Nullable<Int32>, Nullable<Boolean>, Boolean)

設定資料庫範圍的配置吞吐量。

SetValueGenerationStrategy(IConventionModel, Nullable<SqlServerValueGenerationStrategy>, Boolean)

設定 來 SqlServerValueGenerationStrategy 使用模型中沒有明確設定策略的鍵屬性。

ToDebugString(IModel, MetadataDebugStringOptions, Int32)

建立給定元資料的可讀表示法。

警告:請勿依賴回傳字串的格式。 它僅設計用於除錯,且可能在不同版本間任意變動。

UseNamedDefaultConstraints(IConventionModel, Nullable<Boolean>, Boolean)

設定值,指示是否應使用命名的預設約束。

UseNamedDefaultConstraintsConfigurationSource(IConventionModel)

回傳命名預設約束設定的設定來源。

適用於