Class IndexAttribute
Attribute that represents an Index
Inheritance
object
Attribute
Namespace: Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations
Assembly: Umbraco.Infrastructure.dll
Syntax
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
public class IndexAttribute : Attribute
Constructors
View SourceIndexAttribute(IndexTypes)
Declaration
public IndexAttribute(IndexTypes indexType)
Parameters
| Type | Name | Description |
|---|---|---|
| IndexTypes | indexType |
Properties
View SourceForColumns
Gets or sets the column name(s) for the current index
Declaration
public string? ForColumns { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
IncludeColumns
Gets or sets the column name(s) for the columns to include in the index
Declaration
public string? IncludeColumns { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
IndexType
Gets or sets the type of index to create
Declaration
public IndexTypes IndexType { get; }
Property Value
| Type | Description |
|---|---|
| IndexTypes |
Name
Gets or sets the name of the Index
Declaration
public string? Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
Overrides default naming of indexes: IX_tableName