Class CompositeIndexAttribute
Declares a composite index spanning multiple columns. Apply to the class (not a single property) by using the index column names. Can be applied multiple times for multiple composite indexes.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public sealed class CompositeIndexAttribute : Attribute
- Inheritance
-
CompositeIndexAttribute
- Inherited Members
Constructors
CompositeIndexAttribute(string, params string[])
Declares a composite index with the given name covering the specified columns.
public CompositeIndexAttribute(string indexName, params string[] columnNames)
Parameters
indexNamestringIndex name (unique within the table).
columnNamesstring[]One or more column names to include.
Properties
ColumnNames
The column names included in this index.
public string[] ColumnNames { get; }
Property Value
- string[]
IndexName
The index name (must be unique within the table).
public string IndexName { get; }
Property Value
Unique
Whether this is a unique index. Default: false.
public bool Unique { get; set; }