IndexAttribute 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指定要在数据库中生成的索引。
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true)]
[System.Runtime.CompilerServices.Nullable(0)]
public sealed class IndexAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true)]
public sealed class IndexAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true)>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type IndexAttribute = class
inherit 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 |
构成索引的属性,按顺序排列。 |