Skip to content

Allow IndexAttribute on properties #23154

@ajcvickers

Description

@ajcvickers

The EF Core 5.0 IndexAttribute is designed to be placed at the class level, rather than on individual properties. This aligns the definition of composite and single column indexes and avoids confusion about whether or not two columns form a single composite index or two single column indexes.

However, this means that it is not possible to put a simple attribute on a property to create a simple single column index on the mapped column. This issue is on the backlog to gather feedback on the level of demand for this feature.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions