Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
IndexAttribute Class
Definition
- Namespace:
- Microsoft.EntityFrameworkCore
- Assembly:
- Microsoft.EntityFrameworkCore.Abstractions.dll
- Package:
- Microsoft.EntityFrameworkCore.Abstractions v10.0.0
- Package:
- Microsoft.EntityFrameworkCore.Abstractions v5.0.0
- Package:
- Microsoft.EntityFrameworkCore.Abstractions v6.0.0
- Package:
- Microsoft.EntityFrameworkCore.Abstractions v7.0.0
- Package:
- Microsoft.EntityFrameworkCore.Abstractions v8.0.0
- Package:
- Microsoft.EntityFrameworkCore.Abstractions v9.0.0
- Source:
- IndexAttribute.cs
- Source:
- IndexAttribute.cs
- Source:
- IndexAttribute.cs
- Source:
- IndexAttribute.cs
- Source:
- IndexAttribute.cs
- Source:
- IndexAttribute.cs
Important
Some information relates to prerelease product that may be substantially modified before itβs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies an index to be generated in the database.
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true)]
[System.Runtime.CompilerServices.Nullable(0)]
public sealed class IndexAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true)]
public sealed class IndexAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true)>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type IndexAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true)>]
type IndexAttribute = class
inherit Attribute
Public NotInheritable Class IndexAttribute
Inherits Attribute
- Inheritance
-
IndexAttribute
- Attributes
Remarks
See Modeling entity types and relationships for more information and examples.
Constructors
| Name | Description |
|---|---|
| IndexAttribute(String, String[]) |
Initializes a new instance of the IndexAttribute class. |
| IndexAttribute(String[]) |
Obsolete.
Initializes a new instance of the IndexAttribute class. |
Properties
| Name | Description |
|---|---|
| AllDescending |
Whether all index columns have descending sort order. |
| IsDescending |
A set of values indicating whether each corresponding index column has descending sort order. |
| IsUnique |
Whether the index is unique. |
| IsUniqueHasValue |
Checks whether IsUnique has been explicitly set to a value. |
| Name |
The name of the index. |
| PropertyNames |
The properties which constitute the index, in order. |
Applies to
Entity Framework
Feedback
Was this page helpful?
