RuntimeIndex 類別

定義

表示一組屬性上的索引。

public class RuntimeIndex : Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.IIndex
type RuntimeIndex = class
    inherit AnnotatableBase
    interface IIndex
    interface IReadOnlyIndex
    interface IReadOnlyAnnotatable
    interface IAnnotatable
Public Class RuntimeIndex
Inherits AnnotatableBase
Implements IIndex
繼承
RuntimeIndex
實作

備註

如需詳細資訊和範例,請參閱 模型化實體類型和關聯 性。

建構函式

RuntimeIndex(IReadOnlyList<RuntimeProperty>, RuntimeEntityType, String, Boolean)

這是支援 Entity Framework Core 基礎結構的內部 API,不受與公用 API 相同的相容性標準。 它可能會在任何版本中變更或移除,而不會有任何通知。 您應該只在程式碼中直接使用它,並知道這麼做可能會導致應用程式在更新至新的 Entity Framework Core 版本時失敗。

屬性

DebugView

這是支援 Entity Framework Core 基礎結構的內部 API,不受與公用 API 相同的相容性標準。 它可能會在任何版本中變更或移除,而不會有任何通知。 您應該只在程式碼中直接使用它,並知道這麼做可能會導致應用程式在更新至新的 Entity Framework Core 版本時失敗。

DeclaringEntityType

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

IsReadOnly

指出目前物件是否為唯讀。

(繼承來源 AnnotatableBase)
Item[String]

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

(繼承來源 AnnotatableBase)
Name

取得這個索引的名稱。

Properties

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

方法

AddAnnotation(String, Annotation)

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

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

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

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

將批註加入至這個 物件。

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

將批註加入至這個 物件。

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

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

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

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

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

將執行時間批註新增至這個 物件。

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

將執行時間批註新增至這個 物件。

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

建立新的批註。

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

建立新的執行時間批註。

(繼承來源 AnnotatableBase)
EnsureMutable()

如果模型是唯讀的,則會擲回 。

(繼承來源 AnnotatableBase)
EnsureReadOnly()

如果模型不是唯讀,則會擲回 。

(繼承來源 AnnotatableBase)
FindAnnotation(String)

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

(繼承來源 AnnotatableBase)
FindRuntimeAnnotation(String)

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

(繼承來源 AnnotatableBase)
GetAnnotation(String)

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

(繼承來源 AnnotatableBase)
GetAnnotations()

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

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

取得具有指定名稱的執行時間批註值,如果不存在,請加以新增。

(繼承來源 AnnotatableBase)
GetRuntimeAnnotations()

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

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

設定或移除注釋時呼叫。

(繼承來源 AnnotatableBase)
RemoveAnnotation(String)

從這個 物件中移除指定的批註。

(繼承來源 AnnotatableBase)
RemoveRuntimeAnnotation(String)

從這個 物件中移除指定的執行時間批註。

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

設定儲存在指定索引鍵底下的批註。 如果具有指定名稱的注釋已經存在,則會覆寫現有的批註。

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

設定儲存在指定索引鍵底下的批註。 如果具有指定名稱的注釋已經存在,則會覆寫現有的批註。

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

設定儲存在指定索引鍵底下的執行時間批註。 如果具有指定名稱的注釋已經存在,則會覆寫現有的批註。

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

設定儲存在指定索引鍵底下的執行時間批註。 如果具有指定名稱的注釋已經存在,則會覆寫現有的批註。

(繼承來源 AnnotatableBase)
ToString()

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

明確介面實作

IAnnotatable.AddRuntimeAnnotation(String, Object)

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

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

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

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

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

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

從這個 物件中移除指定的執行時間批註。

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

設定儲存在指定索引鍵底下的執行時間批註。 如果具有指定名稱的注釋已經存在,則會覆寫現有的批註。

(繼承來源 AnnotatableBase)
IIndex.DeclaringEntityType

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

IIndex.GetNullableValueFactory<TKey>()

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

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

IIndex.Properties

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

IReadOnlyAnnotatable.FindAnnotation(String)

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

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

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

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

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

(繼承來源 AnnotatableBase)
IReadOnlyIndex.DeclaringEntityType

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

IReadOnlyIndex.IsDescending

一律會傳回 的 RuntimeIndex 空陣列。

IReadOnlyIndex.IsUnique

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

IReadOnlyIndex.Properties

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

擴充方法

AnnotationsToDebugString(IAnnotatable, Int32)

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

FindSharedObjectRootIndex(IIndex, StoreObjectIdentifier)

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

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

FindSharedObjectRootIndex(IReadOnlyIndex, StoreObjectIdentifier)

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

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

GetDatabaseName(IIndex)

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

GetDatabaseName(IIndex, StoreObjectIdentifier)

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

GetDatabaseName(IReadOnlyIndex)

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

GetDatabaseName(IReadOnlyIndex, StoreObjectIdentifier)

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

GetDefaultDatabaseName(IIndex)

傳回用於此索引的預設名稱。

GetDefaultDatabaseName(IIndex, StoreObjectIdentifier)

傳回用於此索引的預設名稱。

GetDefaultDatabaseName(IReadOnlyIndex)

傳回用於此索引的預設名稱。

GetDefaultDatabaseName(IReadOnlyIndex, StoreObjectIdentifier)

傳回用於此索引的預設名稱。

GetDefaultName(IIndex)
已過時。.

傳回用於此索引的預設名稱。

GetFilter(IIndex)

傳回索引篩選運算式。

GetFilter(IIndex, StoreObjectIdentifier)

傳回索引篩選運算式。

GetFilter(IReadOnlyIndex)

傳回索引篩選運算式。

GetFilter(IReadOnlyIndex, StoreObjectIdentifier)

傳回索引篩選運算式。

GetMappedTableIndexes(IIndex)

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

GetName(IIndex)
已過時。.

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

GetFluentApiCalls(IIndex, IAnnotationCodeGenerator)

取得用來設定索引的 Fluent API 呼叫。

IsHandledByDataAnnotations(IIndex, IAnnotationCodeGenerator)

取得值,指出資料批註是否可以完全重新執行這個索引。

GetDataCompression(IReadOnlyIndex)

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

GetDataCompression(IReadOnlyIndex, StoreObjectIdentifier)

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

GetFillFactor(IIndex)

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

GetFillFactor(IReadOnlyIndex)

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

GetFillFactor(IReadOnlyIndex, StoreObjectIdentifier)

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

GetIncludeProperties(IIndex)

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

GetIncludeProperties(IReadOnlyIndex)

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

GetIncludeProperties(IReadOnlyIndex, StoreObjectIdentifier)

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

GetSortInTempDb(IReadOnlyIndex)

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

GetSortInTempDb(IReadOnlyIndex, StoreObjectIdentifier)

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

IsClustered(IIndex)

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

IsClustered(IIndex, StoreObjectIdentifier)

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

IsClustered(IReadOnlyIndex)

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

IsClustered(IReadOnlyIndex, StoreObjectIdentifier)

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

IsCreatedOnline(IIndex)

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

IsCreatedOnline(IReadOnlyIndex)

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

IsCreatedOnline(IReadOnlyIndex, StoreObjectIdentifier)

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

適用於