IndexAttribute 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| IndexAttribute() |
为按约定命名的索引创建实例 IndexAttribute ,并且未指定列顺序、聚类分析或唯一性。 |
| IndexAttribute(String) |
为具有给定名称的索引创建实例 IndexAttribute ,并且没有指定列顺序、聚类分析或唯一性。 |
| IndexAttribute(String, Int32) |
为具有给定名称和列顺序的索引创建实例 IndexAttribute ,但未指定聚集或唯一性。 |
IndexAttribute()
IndexAttribute(String)
为具有给定名称的索引创建实例 IndexAttribute ,并且没有指定列顺序、聚类分析或唯一性。
public IndexAttribute(string name);
new System.ComponentModel.DataAnnotations.Schema.IndexAttribute : string -> System.ComponentModel.DataAnnotations.Schema.IndexAttribute
Public Sub New (name As String)
参数
- name
- String
索引名称。
适用于
IndexAttribute(String, Int32)
为具有给定名称和列顺序的索引创建实例 IndexAttribute ,但未指定聚集或唯一性。
public IndexAttribute(string name, int order);
new System.ComponentModel.DataAnnotations.Schema.IndexAttribute : string * int -> System.ComponentModel.DataAnnotations.Schema.IndexAttribute
Public Sub New (name As String, order As Integer)
参数
- name
- String
索引名称。
- order
- Int32
一个数字,用于确定多列索引的列排序。
注解
多列索引是在多个属性中使用同一索引名称创建的。 然后将这些属性中的信息合并在一起,以指定实际的数据库索引。