語言

IConventionIndex 介面

定義

表示一組屬性上的索引。

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

備註

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

如需詳細資訊和範例,請參閱 模型建置慣例 。

屬性

名稱 Description
Builder

取得可用來設定此索引的產生器。

DeclaringEntityType

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

IsDescending

一組值,指出每個對應的索引資料行是否有遞減排序次序。

(繼承來源 IReadOnlyIndex)
IsInModel

指出此物件是否在模型中,亦即尚未從其中移除。

(繼承來源 IConventionAnnotatable)
IsUnique

取得值,指出指派給索引屬性的值是否是唯一的。

(繼承來源 IReadOnlyIndex)
Item[String]

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

(繼承來源 IReadOnlyAnnotatable)
Name

取得這個索引的名稱。

(繼承來源 IReadOnlyIndex)
Properties

取得這個索引定義所在的屬性。

方法

名稱 Description
AddAnnotation(String, Object, Boolean)

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

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

將批註加入物件。

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

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

(繼承來源 IAnnotatable)
AnnotationsToDebugString(Int32)

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

(繼承來源 IReadOnlyAnnotatable)
DisplayName()

取得指定 IReadOnlyIndex 之 的易記顯示名稱,如果已定義,則傳回它的 Name ,如果這是未命名的索引,則傳回它的 Properties 字串表示。

(繼承來源 IReadOnlyIndex)
FindAnnotation(String)

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

(繼承來源 IReadOnlyAnnotatable)
FindRuntimeAnnotation(String)

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

(繼承來源 IAnnotatable)
FindRuntimeAnnotationValue(String)

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

(繼承來源 IAnnotatable)
GetAnnotation(String)

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

(繼承來源 IReadOnlyAnnotatable)
GetAnnotations()

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

(繼承來源 IReadOnlyAnnotatable)
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)

將批註加入物件。

GetAnnotation(IConventionAnnotatable, String)

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

SetOrRemoveAnnotation(IConventionAnnotatable, String, Object, Boolean)

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

GetNullableValueFactory<TKey>(IIndex)

根據從各種實體資料形式取得索引鍵值的索引鍵值,取得索引鍵值的處理站。

這個方法通常由資料庫提供者 (和其他延伸模組) 使用。 它通常不會用於應用程式程式碼。

ToDebugString(IIndex, MetadataDebugStringOptions, Int32)

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

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

AnnotationsToDebugString(IAnnotatable, Int32)

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

GetAnnotation(IAnnotatable, String)

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

FindSharedObjectRootIndex(IConventionIndex, StoreObjectIdentifier)

尋找對應至共用資料表類似物件中相同索引的第 IConventionIndex 一個 。

這個方法通常由資料庫提供者 (和其他延伸模組) 使用。 它通常不會用於應用程式程式碼。

FindSharedObjectRootIndex(IIndex, StoreObjectIdentifier)

尋找對應至共用資料表類似物件中相同索引的第 IConventionIndex 一個 。

這個方法通常由資料庫提供者 (和其他延伸模組) 使用。 它通常不會用於應用程式程式碼。

FindSharedObjectRootIndex(IReadOnlyIndex, StoreObjectIdentifier)

尋找對應至共用資料表類似物件中相同索引的第 IIndex 一個 。

這個方法通常由資料庫提供者 (和其他延伸模組) 使用。 它通常不會用於應用程式程式碼。

GetDatabaseName(IIndex, StoreObjectIdentifier)

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

GetDatabaseName(IIndex)

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

GetDatabaseName(IReadOnlyIndex, StoreObjectIdentifier)

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

GetDatabaseName(IReadOnlyIndex)

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

GetDatabaseNameConfigurationSource(IConventionIndex)

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

GetDefaultDatabaseName(IIndex, StoreObjectIdentifier)

傳回將用於這個索引的預設名稱。

GetDefaultDatabaseName(IIndex)

傳回將用於這個索引的預設名稱。

GetDefaultDatabaseName(IReadOnlyIndex, StoreObjectIdentifier)

傳回將用於這個索引的預設名稱。

GetDefaultDatabaseName(IReadOnlyIndex)

傳回將用於這個索引的預設名稱。

GetDefaultName(IIndex)
已淘汰.

傳回將用於這個索引的預設名稱。

GetFilter(IIndex, StoreObjectIdentifier)

傳回索引篩選運算式。

GetFilter(IIndex)

傳回索引篩選運算式。

GetFilter(IReadOnlyIndex, StoreObjectIdentifier)

傳回索引篩選運算式。

GetFilter(IReadOnlyIndex)

傳回索引篩選運算式。

GetFilterConfigurationSource(IConventionIndex)

ConfigurationSource取得索引篩選運算式的 。

GetMappedTableIndexes(IIndex)

取得索引所對應的資料表索引。

GetName(IIndex)
已淘汰.

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

GetNameConfigurationSource(IConventionIndex)
已淘汰.

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

SetDatabaseName(IConventionIndex, String, Boolean)

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

SetFilter(IConventionIndex, String, Boolean)

設定索引篩選運算式。

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

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

GetDataCompression(IReadOnlyIndex, StoreObjectIdentifier)

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

GetDataCompression(IReadOnlyIndex)

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

GetDataCompressionConfigurationSource(IConventionIndex)

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

GetFillFactor(IIndex)

傳回值,指出索引是否使用填滿因數。

GetFillFactor(IReadOnlyIndex, StoreObjectIdentifier)

傳回索引使用的填滿因數。

GetFillFactor(IReadOnlyIndex)

傳回索引使用的填滿因數。

GetFillFactorConfigurationSource(IConventionIndex)

傳 ConfigurationSource 回索引是否使用填滿因數的 。

GetIncludeProperties(IIndex)

傳回包含的屬性名稱,如果尚未指定,則 null 傳回 。

GetIncludeProperties(IReadOnlyIndex, StoreObjectIdentifier)

傳回包含的屬性名稱,如果尚未指定,則 null 傳回 。

GetIncludeProperties(IReadOnlyIndex)

傳回包含的屬性名稱,如果尚未指定,則 null 傳回 。

GetIncludePropertiesConfigurationSource(IConventionIndex)

傳 ConfigurationSource 回包含之屬性名稱的 。

GetIsClusteredConfigurationSource(IConventionIndex)

傳 ConfigurationSource 回索引是否為叢集的 。

GetIsCreatedOnlineConfigurationSource(IConventionIndex)

傳 ConfigurationSource 回索引是否在線上的 。

GetSortInTempDb(IReadOnlyIndex, StoreObjectIdentifier)

傳回值,指出索引是否在 tempdb 中排序。

GetSortInTempDb(IReadOnlyIndex)

傳回值,指出索引是否在 tempdb 中排序。

GetSortInTempDbConfigurationSource(IConventionIndex)

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

IsClustered(IIndex, StoreObjectIdentifier)

傳回值,指出索引是否已叢集化。

IsClustered(IIndex)

傳回值,指出索引是否已叢集化。

IsClustered(IReadOnlyIndex, StoreObjectIdentifier)

傳回值,指出索引是否已叢集化。

IsClustered(IReadOnlyIndex)

傳回值,指出索引是否已叢集化。

IsCreatedOnline(IIndex)

傳回值,指出索引是否在線上。

IsCreatedOnline(IReadOnlyIndex, StoreObjectIdentifier)

傳回值,指出索引是否在線上。

IsCreatedOnline(IReadOnlyIndex)

傳回值,指出索引是否在線上。

SetDataCompression(IConventionIndex, Nullable<DataCompressionType>, Boolean)

設定值,指出索引所使用的資料壓縮。

SetFillFactor(IConventionIndex, Nullable<Int32>, Boolean)

定義值,指出索引是否使用填滿因數。

SetIncludeProperties(IConventionIndex, IReadOnlyList<String>, Boolean)

設定包含的屬性名稱。

SetIsClustered(IConventionIndex, Nullable<Boolean>, Boolean)

設定值,指出索引是否已叢集化。

SetIsCreatedOnline(IConventionIndex, Nullable<Boolean>, Boolean)

設定值,指出索引是否在線上。

SetSortInTempDb(IConventionIndex, Nullable<Boolean>, Boolean)

設定值,指出索引是否在 tempdb 中排序。

適用於