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

依序構成索引的屬性。

適用於