IndexAttribute Class
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)]
public sealed class IndexAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true)>]
type IndexAttribute = class
inherit Attribute
Public NotInheritable Class IndexAttribute
Inherits Attribute
- Inheritance
-
IndexAttribute
- Attributes
See Modeling entity types and relationships for more information and examples.
Index |
Initializes a new instance of the IndexAttribute class. |
Index |
Obsolete.
Initializes a new instance of the IndexAttribute class. |
All |
Whether all index columns have descending sort order. |
Is |
A set of values indicating whether each corresponding index column has descending sort order. |
Is |
Whether the index is unique. |
Is |
Checks whether IsUnique has been explicitly set to a value. |
Name |
The name of the index. |
Property |
The properties which constitute the index, in order. |
Product | Versions |
---|---|
Entity Framework Core | 5.0, 6.0, 7.0, 8.0, 9.0 |
Entity Framework feedback
Entity Framework is an open source project. Select a link to provide feedback: