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