Table of Contents

Class CompositeIndexAttribute

Namespace
CL.MySQL2.Models
Assembly
CL.MySQL2.dll

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

indexName string

Index name (unique within the table).

columnNames string[]

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

string

Unique

Whether this is a unique index. Default: false.

public bool Unique { get; set; }

Property Value

bool