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)

返回一个值,该值指示索引是否联机。

适用于