Share via


IndexAttribute 类

定义

指定要在数据库中生成的索引。

[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true)]
public sealed class IndexAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true)>]
type IndexAttribute = class
    inherit Attribute
Public NotInheritable Class IndexAttribute
Inherits Attribute
继承
IndexAttribute
属性

注解

有关详细信息和示例,请参阅 为实体类型和关系建模

构造函数

IndexAttribute(String, String[])

初始化 IndexAttribute 类的新实例。

IndexAttribute(String[])
已过时.

初始化 IndexAttribute 类的新实例。

属性

AllDescending

是否所有索引列都有降序排序顺序。

IsDescending

一组值,指示每个相应的索引列是否具有降序排序顺序。

IsUnique

索引是否唯一。

IsUniqueHasValue

检查是否已 IsUnique 显式设置为值。

Name

索引的名称。

PropertyNames

按顺序构成索引的属性。

适用于