I have a table in SQL Server which includes custom nonclustered indexes for some columns. And I have also a project with below versions.
- .Net Framework 4.6.2
- Entity Framework 6.4.4
I added an entity data model to project based on my existing database (using a database-first approach).
Although a SELECT query returns quickly in database, the same query gets a timeout error in the project. And I thought that EF couldn't add
column indexes to the project. I searched index names in the project,
but there isn't any code about indexes in the project.
So, how can I add indexes to my database-first model?
Database firstmeans you create the database first, including any indexes.there isn't any code about indexes in the project.there wouldn't be. You don't write any index-specific code in your SQL query after all.the same query gets a timeout error in the projectwhat does your code do? How much data is there?