語言

RuntimeIndex 類別

定義

代表一組屬性的索引。

[System.Runtime.CompilerServices.Nullable(0)]
public class RuntimeIndex : Microsoft.EntityFrameworkCore.Infrastructure.RuntimeAnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.IIndex
public class RuntimeIndex : Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.IIndex
[System.Runtime.CompilerServices.Nullable(0)]
public class RuntimeIndex : Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.IIndex
[<System.Runtime.CompilerServices.Nullable(0)>]
type RuntimeIndex = class
    inherit RuntimeAnnotatableBase
    interface IIndex
    interface IReadOnlyIndex
    interface IReadOnlyAnnotatable
    interface IAnnotatable
type RuntimeIndex = class
    inherit AnnotatableBase
    interface IIndex
    interface IReadOnlyIndex
    interface IReadOnlyAnnotatable
    interface IAnnotatable
[<System.Runtime.CompilerServices.Nullable(0)>]
type RuntimeIndex = class
    inherit AnnotatableBase
    interface IIndex
    interface IReadOnlyIndex
    interface IReadOnlyAnnotatable
    interface IAnnotatable
Public Class RuntimeIndex
Inherits RuntimeAnnotatableBase
Implements IIndex
Public Class RuntimeIndex
Inherits AnnotatableBase
Implements IIndex
繼承
繼承
RuntimeIndex
屬性
實作

備註

更多資訊與範例請參閱 建模實體類型與關係 。

建構函式

名稱 Description
RuntimeIndex(IReadOnlyList<RuntimeProperty>, RuntimeEntityType, String, Boolean)

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

RuntimeIndex(IReadOnlyList<RuntimePropertyBase>, RuntimeEntityType, String, Boolean, IReadOnlyList<IReadOnlyList<Nullable<Int32>>>)

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

屬性

名稱 Description
DebugView

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

DeclaringEntityType

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

IsReadOnly

表示目前物件是否為唯讀。

(繼承來源 AnnotatableBase)
Item[String]

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

(繼承來源 RuntimeAnnotatableBase)
Item[String]

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

(繼承來源 AnnotatableBase)
Name

會知道這個索引的名字。

Properties

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

方法

名稱 Description
AddAnnotation(String, Annotation)

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

(繼承來源 AnnotatableBase)
AddAnnotation(String, Object)

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

(繼承來源 RuntimeAnnotatableBase)
AddAnnotation(String, Object)

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

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

為此物件新增註解,覆蓋任何同名的現有註解。

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

為此物件新增註解。

(繼承來源 AnnotatableBase)
AddAnnotations(IReadOnlyDictionary<String,Object>)

為此物件新增註解,覆蓋任何同名的現有註解。

(繼承來源 RuntimeAnnotatableBase)
AddAnnotations(IReadOnlyDictionary<String,Object>)

為此物件新增註解。

(繼承來源 AnnotatableBase)
AddRuntimeAnnotation(String, Annotation)

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

(繼承來源 RuntimeAnnotatableBase)
AddRuntimeAnnotation(String, Annotation)

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

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

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

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

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

(繼承來源 AnnotatableBase)
AddRuntimeAnnotations(IEnumerable<Annotation>)

為此物件新增執行時註解。

(繼承來源 RuntimeAnnotatableBase)
AddRuntimeAnnotations(IEnumerable<Annotation>)

為此物件新增執行時註解。

(繼承來源 AnnotatableBase)
AddRuntimeAnnotations(IReadOnlyDictionary<String,Object>)

為此物件新增執行時註解。

(繼承來源 RuntimeAnnotatableBase)
AddRuntimeAnnotations(IReadOnlyDictionary<String,Object>)

為此物件新增執行時註解。

(繼承來源 AnnotatableBase)
CreateAnnotation(String, Object)

建立新的註解。

(繼承來源 RuntimeAnnotatableBase)
CreateAnnotation(String, Object)

建立新的註解。

(繼承來源 AnnotatableBase)
CreateRuntimeAnnotation(String, Object)

建立新的執行時註解。

(繼承來源 RuntimeAnnotatableBase)
CreateRuntimeAnnotation(String, Object)

建立新的執行時註解。

(繼承來源 AnnotatableBase)
EnsureMutable()

如果模型是唯讀,則會拋出。

(繼承來源 AnnotatableBase)
EnsureReadOnly()

若模型非唯讀,則會擲出。

(繼承來源 AnnotatableBase)
FindAnnotation(String)

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

(繼承來源 RuntimeAnnotatableBase)
FindAnnotation(String)

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

(繼承來源 AnnotatableBase)
FindRuntimeAnnotation(String)

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

(繼承來源 RuntimeAnnotatableBase)
FindRuntimeAnnotation(String)

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

(繼承來源 AnnotatableBase)
GetAnnotation(String)

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

(繼承來源 RuntimeAnnotatableBase)
GetAnnotation(String)

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

(繼承來源 AnnotatableBase)
GetAnnotations()

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

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

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

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

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

(繼承來源 AnnotatableBase)
GetRuntimeAnnotations()

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

(繼承來源 RuntimeAnnotatableBase)
GetRuntimeAnnotations()

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

(繼承來源 AnnotatableBase)
OnAnnotationSet(String, Annotation, Annotation)

當註解被設定或移除時會被呼叫。

(繼承來源 AnnotatableBase)
RemoveAnnotation(String)

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

(繼承來源 RuntimeAnnotatableBase)
RemoveAnnotation(String)

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

(繼承來源 AnnotatableBase)
RemoveRuntimeAnnotation(String)

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

(繼承來源 RuntimeAnnotatableBase)
RemoveRuntimeAnnotation(String)

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

(繼承來源 AnnotatableBase)
SetAnnotation(String, Annotation, Annotation)

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

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

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

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

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

(繼承來源 AnnotatableBase)
SetRuntimeAnnotation(String, Annotation, Annotation)

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

(繼承來源 RuntimeAnnotatableBase)
SetRuntimeAnnotation(String, Annotation, Annotation)

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

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

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

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

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

(繼承來源 AnnotatableBase)
ToString()

傳回表示目前 物件的字串。

明確介面實作

名稱 Description
IAnnotatable.AddRuntimeAnnotation(String, Object)

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

(繼承來源 RuntimeAnnotatableBase)
IAnnotatable.AddRuntimeAnnotation(String, Object)

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

(繼承來源 AnnotatableBase)
IAnnotatable.FindRuntimeAnnotation(String)

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

(繼承來源 RuntimeAnnotatableBase)
IAnnotatable.FindRuntimeAnnotation(String)

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

(繼承來源 AnnotatableBase)
IAnnotatable.GetRuntimeAnnotations()

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

(繼承來源 RuntimeAnnotatableBase)
IAnnotatable.GetRuntimeAnnotations()

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

(繼承來源 AnnotatableBase)
IAnnotatable.RemoveRuntimeAnnotation(String)

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

(繼承來源 RuntimeAnnotatableBase)
IAnnotatable.RemoveRuntimeAnnotation(String)

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

(繼承來源 AnnotatableBase)
IAnnotatable.SetRuntimeAnnotation(String, Object)

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

(繼承來源 RuntimeAnnotatableBase)
IAnnotatable.SetRuntimeAnnotation(String, Object)

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

(繼承來源 AnnotatableBase)
IIndex.DeclaringEntityType

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

IIndex.GetNullableValueFactory<TKey>()

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

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

IIndex.Properties

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

IReadOnlyAnnotatable.FindAnnotation(String)

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

(繼承來源 RuntimeAnnotatableBase)
IReadOnlyAnnotatable.FindAnnotation(String)

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

(繼承來源 AnnotatableBase)
IReadOnlyAnnotatable.GetAnnotations()

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

(繼承來源 RuntimeAnnotatableBase)
IReadOnlyAnnotatable.GetAnnotations()

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

(繼承來源 AnnotatableBase)
IReadOnlyAnnotatable.Item[String]

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

(繼承來源 RuntimeAnnotatableBase)
IReadOnlyAnnotatable.Item[String]

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

(繼承來源 AnnotatableBase)
IReadOnlyIndex.CollectionIndices

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

IReadOnlyIndex.DeclaringEntityType

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

IReadOnlyIndex.IsDescending

總是回傳一個空陣列。RuntimeIndex

IReadOnlyIndex.IsUnique

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

IReadOnlyIndex.Properties

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

擴充方法

名稱 Description
AnnotationsToDebugString(IAnnotatable, Int32)

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

FindSharedObjectRootIndex(IIndex, StoreObjectIdentifier)

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

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

FindSharedObjectRootIndex(IReadOnlyIndex, StoreObjectIdentifier)

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

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

GetDatabaseName(IIndex, StoreObjectIdentifier)

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

GetDatabaseName(IIndex)

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

GetDatabaseName(IReadOnlyIndex, StoreObjectIdentifier)

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

GetDatabaseName(IReadOnlyIndex)

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

GetDataCompression(IReadOnlyIndex, StoreObjectIdentifier)

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

GetDataCompression(IReadOnlyIndex)

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

GetDefaultDatabaseName(IIndex, StoreObjectIdentifier)

回傳該索引的預設名稱。

GetDefaultDatabaseName(IIndex)

回傳該索引的預設名稱。

GetDefaultDatabaseName(IReadOnlyIndex, StoreObjectIdentifier)

回傳該索引的預設名稱。

GetDefaultDatabaseName(IReadOnlyIndex)

回傳該索引的預設名稱。

GetDefaultName(IIndex)
已淘汰.

回傳該索引的預設名稱。

GetFillFactor(IIndex)

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

GetFillFactor(IReadOnlyIndex, StoreObjectIdentifier)

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

GetFillFactor(IReadOnlyIndex)

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

GetFilter(IIndex, StoreObjectIdentifier)

回傳索引過濾器表達式。

GetFilter(IIndex)

回傳索引過濾器表達式。

GetFilter(IReadOnlyIndex, StoreObjectIdentifier)

回傳索引過濾器表達式。

GetFilter(IReadOnlyIndex)

回傳索引過濾器表達式。

GetFluentApiCalls(IIndex, IAnnotationCodeGenerator)

取得流暢的 API 呼叫來設定索引。

GetFullTextCatalog(IReadOnlyIndex, StoreObjectIdentifier)

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

GetFullTextCatalog(IReadOnlyIndex)

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

GetFullTextChangeTracking(IReadOnlyIndex, StoreObjectIdentifier)

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

GetFullTextChangeTracking(IReadOnlyIndex)

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

GetFullTextKeyIndex(IReadOnlyIndex, StoreObjectIdentifier)

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

GetFullTextKeyIndex(IReadOnlyIndex)

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

GetFullTextLanguage(IReadOnlyIndex, String)

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

GetFullTextLanguages(IReadOnlyIndex)

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

GetIncludeProperties(IIndex)

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

GetIncludeProperties(IReadOnlyIndex, StoreObjectIdentifier)

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

GetIncludeProperties(IReadOnlyIndex)

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

GetMappedTableIndexes(IIndex)

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

GetName(IIndex)
已淘汰.

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

GetSortInTempDb(IReadOnlyIndex, StoreObjectIdentifier)

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

GetSortInTempDb(IReadOnlyIndex)

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

GetVectorIndexType(IReadOnlyIndex, StoreObjectIdentifier)

回傳向量索引的類型。

GetVectorIndexType(IReadOnlyIndex)

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

GetVectorIndexType(IReadOnlyIndex)

回傳向量索引的類型。

GetVectorMetric(IReadOnlyIndex, StoreObjectIdentifier)

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

GetVectorMetric(IReadOnlyIndex)

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

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)

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

IsHandledByDataAnnotations(IIndex, IAnnotationCodeGenerator)

獲得值,表示該索引是否能完全由資料註解回應。

IsVectorIndex(IReadOnlyIndex)

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

適用於