語言

IConventionIndex 介面

定義

代表一組屬性的索引。

public interface IConventionIndex : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyIndex
public interface IConventionIndex : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IIndex
type IConventionIndex = interface
    interface IReadOnlyIndex
    interface IReadOnlyAnnotatable
    interface IConventionAnnotatable
type IConventionIndex = interface
    interface IIndex
    interface IAnnotatable
    interface IConventionAnnotatable
Public Interface IConventionIndex
Implements IConventionAnnotatable, IReadOnlyIndex
Public Interface IConventionIndex
Implements IConventionAnnotatable, IIndex
實作

備註

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

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

屬性

名稱 Description
Builder

取得可用來設定此索引的建構工具。

CollectionIndices

取得遍歷的複數集合索引,以達到每個索引屬性。

(繼承來源 IReadOnlyIndex)
DeclaringEntityType

取得索引所定義的實體類型。 這可能與定義在 上的類型 Properties 不同,當索引被定義為繼承階層中的導出型別時(因為屬性可能定義在基底型態上)。

IsDescending

一組值,指示每個對應的索引欄是否採用遞減排序順序。

(繼承來源 IReadOnlyIndex)
IsInModel

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

(繼承來源 IConventionAnnotatable)
IsUnique

會獲得一個值,表示指派給索引屬性的值是否唯一。

(繼承來源 IIndex)
Item[String]

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

(繼承來源 IAnnotatable)
Name

會知道這個索引的名字。

(繼承來源 IIndex)
Properties

取得該索引所定義的屬性。

方法

名稱 Description
AddAnnotation(String, Object, Boolean)

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

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

為物件添加註解。

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

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

(繼承來源 IAnnotatable)
AnnotationsToDebugString(Int32)

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

(繼承來源 IReadOnlyAnnotatable)
DisplayName()

取得給定 IReadOnlyIndex的友善顯示名稱,若定義為 則回傳 it Name ,若為未命名索引則回傳其字串表示 Properties 。

(繼承來源 IReadOnlyIndex)
FindAnnotation(String)

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

(繼承來源 IAnnotatable)
FindRuntimeAnnotation(String)

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

(繼承來源 IAnnotatable)
FindRuntimeAnnotationValue(String)

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

(繼承來源 IAnnotatable)
GetAnnotation(String)

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

(繼承來源 IConventionAnnotatable)
GetAnnotations()

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

(繼承來源 IAnnotatable)
GetConfigurationSource()

回傳此索引的設定來源。

GetIsDescendingConfigurationSource()

回傳 的 IsDescending配置來源。

GetIsUniqueConfigurationSource()

回傳 的 IsUnique配置來源。

GetNullableValueFactory<TKey>()

根據從各種實體資料取得的索引鍵值,獲得一個關鍵值的工廠。

此方法通常由資料庫提供者(及其他擴充)使用。 它通常不被用於應用程式程式碼中。

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

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

(繼承來源 IAnnotatable)
GetRuntimeAnnotations()

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

(繼承來源 IAnnotatable)
RemoveAnnotation(String)

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

(繼承來源 IConventionAnnotatable)
RemoveRuntimeAnnotation(String)

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

(繼承來源 IAnnotatable)
SetAnnotation(String, Object, Boolean)

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

(繼承來源 IConventionAnnotatable)
SetIsDescending(IReadOnlyList<Boolean>, Boolean)

設定此索引的排序順序(升序或降序)。

SetIsUnique(Nullable<Boolean>, Boolean)

設定一個值,表示指派給索引屬性的值是否唯一。

SetOrRemoveAnnotation(String, Object, Boolean)

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

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

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

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

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

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

(繼承來源 IReadOnlyIndex)

擴充方法

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

為物件添加註解。

AnnotationsToDebugString(IAnnotatable, Int32)

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

FindSharedObjectRootIndex(IConventionIndex, StoreObjectIdentifier)

找到第一個 IConventionIndex 映射到共享資料表類物件中相同索引的檔案。

此方法通常由資料庫提供者(及其他擴充)使用。 它通常不被用於應用程式程式碼中。

FindSharedObjectRootIndex(IIndex, StoreObjectIdentifier)

找到第一個 IConventionIndex 映射到共享資料表類物件中相同索引的檔案。

此方法通常由資料庫提供者(及其他擴充)使用。 它通常不被用於應用程式程式碼中。

FindSharedObjectRootIndex(IReadOnlyIndex, StoreObjectIdentifier)

找到第一個 IIndex 映射到共享資料表類物件中相同索引的檔案。

此方法通常由資料庫提供者(及其他擴充)使用。 它通常不被用於應用程式程式碼中。

GetAnnotation(IAnnotatable, String)

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

GetAnnotation(IConventionAnnotatable, String)

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

GetDatabaseName(IIndex, StoreObjectIdentifier)

回傳資料庫中索引的名稱。

GetDatabaseName(IIndex)

回傳資料庫中索引的名稱。

GetDatabaseName(IReadOnlyIndex, StoreObjectIdentifier)

回傳資料庫中索引的名稱。

GetDatabaseName(IReadOnlyIndex)

回傳資料庫中索引的名稱。

GetDatabaseNameConfigurationSource(IConventionIndex)

會取得資料庫中索引名稱的 。ConfigurationSource

GetDataCompression(IReadOnlyIndex, StoreObjectIdentifier)

回傳索引所使用的資料壓縮。

GetDataCompression(IReadOnlyIndex)

回傳索引所使用的資料壓縮。

GetDataCompressionConfigurationSource(IConventionIndex)

回傳索引 ConfigurationSource 所用的資料壓縮。

GetDefaultDatabaseName(IIndex, StoreObjectIdentifier)

回傳該索引的預設名稱。

GetDefaultDatabaseName(IIndex)

回傳該索引的預設名稱。

GetDefaultDatabaseName(IReadOnlyIndex, StoreObjectIdentifier)

回傳該索引的預設名稱。

GetDefaultDatabaseName(IReadOnlyIndex)

回傳該索引的預設名稱。

GetDefaultName(IIndex)
已淘汰.

回傳該索引的預設名稱。

GetFillFactor(IIndex)

回傳一個值,表示索引是否使用填充因子。

GetFillFactor(IReadOnlyIndex, StoreObjectIdentifier)

回傳索引所使用的填充因子。

GetFillFactor(IReadOnlyIndex)

回傳索引所使用的填充因子。

GetFillFactorConfigurationSource(IConventionIndex)

回傳 for ConfigurationSource 索引是否使用填充因子。

GetFilter(IIndex, StoreObjectIdentifier)

回傳索引過濾器表達式。

GetFilter(IIndex)

回傳索引過濾器表達式。

GetFilter(IReadOnlyIndex, StoreObjectIdentifier)

回傳索引過濾器表達式。

GetFilter(IReadOnlyIndex)

回傳索引過濾器表達式。

GetFilterConfigurationSource(IConventionIndex)

取得索引濾子表達式的 。ConfigurationSource

GetFullTextCatalog(IReadOnlyIndex, StoreObjectIdentifier)

回傳全文索引的全文目錄名稱。

GetFullTextCatalog(IReadOnlyIndex)

回傳全文索引的全文目錄名稱。

GetFullTextCatalogConfigurationSource(IConventionIndex)

返回全 ConfigurationSource 文索引的全文目錄。

GetFullTextChangeTracking(IReadOnlyIndex, StoreObjectIdentifier)

回傳全文索引的變更追蹤模式。

GetFullTextChangeTracking(IReadOnlyIndex)

回傳全文索引的變更追蹤模式。

GetFullTextChangeTrackingConfigurationSource(IConventionIndex)

回傳 ConfigurationSource 全文索引的變更追蹤模式。

GetFullTextKeyIndex(IReadOnlyIndex, StoreObjectIdentifier)

回傳全文索引的 KEY INDEX 名稱。

GetFullTextKeyIndex(IReadOnlyIndex)

回傳全文索引的 KEY INDEX 名稱。

GetFullTextKeyIndexConfigurationSource(IConventionIndex)

回傳 ConfigurationSource 全文索引的 KEY INDEX。

GetFullTextLanguage(IReadOnlyIndex, String)

回傳全文索引中特定屬性的全文語言。

GetFullTextLanguages(IReadOnlyIndex)

回傳所有已設定為全文索引的全文語言。

GetFullTextLanguagesConfigurationSource(IConventionIndex)

回傳全 ConfigurationSource 文索引的全文語言。

GetIncludeProperties(IIndex)

報稅表中包含物業名稱,或 null 未指定者。

GetIncludeProperties(IReadOnlyIndex, StoreObjectIdentifier)

報稅表中包含物業名稱,或 null 未指定者。

GetIncludeProperties(IReadOnlyIndex)

報稅表中包含物業名稱,或 null 未指定者。

GetIncludePropertiesConfigurationSource(IConventionIndex)

回傳 ConfigurationSource 包含的物業名稱。

GetIsClusteredConfigurationSource(IConventionIndex)

回傳 對於 ConfigurationSource 索引是否為叢集。

GetIsCreatedOnlineConfigurationSource(IConventionIndex)

回傳 ConfigurationSource 索引是否在線。

GetIsFullTextIndexConfigurationSource(IConventionIndex)

回傳 對於ConfigurationSource是否 。IsFullTextIndex(IReadOnlyIndex)

GetMappedTableIndexes(IIndex)

取得索引所映射的表格索引。

GetName(IIndex)
已淘汰.

回傳資料庫中索引的名稱。

GetNameConfigurationSource(IConventionIndex)
已淘汰.

會取得資料庫中索引名稱的 。ConfigurationSource

GetNullableValueFactory<TKey>(IIndex)

根據從各種實體資料取得的索引鍵值,獲得一個關鍵值的工廠。

此方法通常由資料庫提供者(及其他擴充)使用。 它通常不被用於應用程式程式碼中。

GetSortInTempDb(IReadOnlyIndex, StoreObjectIdentifier)

回傳一個值,表示該索引是否在 tempdb 中被排序。

GetSortInTempDb(IReadOnlyIndex)

回傳一個值,表示該索引是否在 tempdb 中被排序。

GetSortInTempDbConfigurationSource(IConventionIndex)

回傳 for ConfigurationSource 索引是否在 tempdb 中被排序。

GetVectorIndexType(IReadOnlyIndex, StoreObjectIdentifier)

回傳向量索引的類型。

GetVectorIndexType(IReadOnlyIndex)

回傳可使用的向量索引類型,例如「flat」、「diskANN」或「quantizedFlat」。 欲了解更多資訊,請參閱 Azure Cosmos DB 中的向量搜尋 for NoSQL。

GetVectorIndexType(IReadOnlyIndex)

回傳向量索引的類型。

GetVectorIndexTypeConfigurationSource(IConventionIndex)

回傳 對於ConfigurationSource是否 。GetVectorIndexType(IReadOnlyIndex)

GetVectorIndexTypeConfigurationSource(IConventionIndex)

回傳 ConfigurationSource 向量索引的類型。

GetVectorMetric(IReadOnlyIndex, StoreObjectIdentifier)

回傳向量指數的相似度指標。

GetVectorMetric(IReadOnlyIndex)

回傳向量指數的相似度指標。

GetVectorMetricConfigurationSource(IConventionIndex)

回傳向 ConfigurationSource 量指數的相似度度量。

IsClustered(IIndex, StoreObjectIdentifier)

回傳一個值,表示索引是否為叢集。

IsClustered(IIndex)

回傳一個值,表示索引是否為叢集。

IsClustered(IReadOnlyIndex, StoreObjectIdentifier)

回傳一個值,表示索引是否為叢集。

IsClustered(IReadOnlyIndex)

回傳一個值,表示索引是否為叢集。

IsCreatedOnline(IIndex)

回傳一個值,表示該索引是否在線。

IsCreatedOnline(IReadOnlyIndex, StoreObjectIdentifier)

回傳一個值,表示該索引是否在線。

IsCreatedOnline(IReadOnlyIndex)

回傳一個值,表示該索引是否在線。

IsFullTextIndex(IReadOnlyIndex)

回傳索引是否設定為全文搜尋的值。 欲了解更多資訊,請參閱 Azure Cosmos DB 中的全文搜尋 NoSQL。

IsFullTextIndex(IReadOnlyIndex)

回傳索引是否為全文索引。

IsVectorIndex(IReadOnlyIndex)

回傳索引是否為向量索引。

SetDatabaseName(IConventionIndex, String, Boolean)

設定資料庫中索引的名稱。

SetDataCompression(IConventionIndex, Nullable<DataCompressionType>, Boolean)

設定一個值,表示索引所使用的資料壓縮。

SetFillFactor(IConventionIndex, Nullable<Int32>, Boolean)

定義一個值,表示索引是否使用填充因子。

SetFilter(IConventionIndex, String, Boolean)

設定索引過濾器表達式。

SetFullTextCatalog(IConventionIndex, String, Boolean)

設定全文目錄名稱為全文索引。

SetFullTextChangeTracking(IConventionIndex, Nullable<FullTextChangeTracking>, Boolean)

設定全文索引的變更追蹤模式。

SetFullTextKeyIndex(IConventionIndex, String, Boolean)

設定全文索引的 KEY INDEX 名稱。 設定非空值會將此索引標記為全文索引。

SetFullTextLanguage(IConventionIndex, String, String, Boolean)

為全文索引中特定屬性設定全文語言。

SetFullTextLanguages(IConventionIndex, IReadOnlyDictionary<String,String>, Boolean)

設定全文索引中所有屬性的全文語言。

SetIncludeProperties(IConventionIndex, IReadOnlyList<String>, Boolean)

套裝包含物業名稱。

SetIsClustered(IConventionIndex, Nullable<Boolean>, Boolean)

設定一個值,表示索引是否為叢集。

SetIsCreatedOnline(IConventionIndex, Nullable<Boolean>, Boolean)

設定一個值,表示索引是否在線。

SetIsFullTextIndex(IConventionIndex, Nullable<Boolean>, Boolean)

設定索引以進行全文搜尋。 欲了解更多資訊,請參閱 Azure Cosmos DB 中的全文搜尋 NoSQL。

SetName(IConventionIndex, String, Boolean)
已淘汰.

設定資料庫中索引的名稱。

SetOrRemoveAnnotation(IConventionAnnotatable, String, Object, Boolean)

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

SetSortInTempDb(IConventionIndex, Nullable<Boolean>, Boolean)

設定一個值,表示索引是否在 tempdb 中被排序。

SetVectorIndexType(IConventionIndex, Nullable<VectorIndexType>, Boolean)

設定向量索引類型,例如「flat」、「diskANN」或「quantizedFlat」。 欲了解更多資訊,請參閱 Azure Cosmos DB 中的向量搜尋 for NoSQL。

SetVectorIndexType(IConventionIndex, Nullable<VectorIndexType>, Nullable<Boolean>, Boolean)

設定向量索引類型,例如「flat」、「diskANN」或「quantizedFlat」。 欲了解更多資訊,請參閱 Azure Cosmos DB 中的向量搜尋 for NoSQL。

SetVectorIndexType(IConventionIndex, String, Boolean)

設定向量索引的類型。

SetVectorMetric(IConventionIndex, String, Boolean)

設定向量指數的相似度度量。

ToDebugString(IIndex, MetadataDebugStringOptions, Int32)

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

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

適用於