Open
Description
I understand that when using migrations, indexes defined in OnModelCreating will be created in the database.
I have an existing database, with indexes already set up, and was wondering if there is a benefit to defining these indexes in my DbContext? Does EFCore use these index definitions to influence how it builds queries, or does defining an existing index have no effect?
Thanks
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: f85ea32c-8d23-d61d-6036-cd772e3e95d9
- Version Independent ID: 25dd8ac4-2521-5200-0ddf-63ac8c83787a
- Content: Indexes - EF Core
- Content Source: entity-framework/core/modeling/indexes.md
- Product: entity-framework
- Technology: entity-framework-core
- GitHub Login: @rowanmiller
- Microsoft Alias: divega