Entity Framework Code-First - Define the Non-clustered key for this EntityType

ef-code-first entity-framework entity-framework-6 entity-framework-6.1

Accepted Answer

As part of your code first configuration, it is still not yet able to generate non-clustered primary key fields.

See the Entity Framework work item below for a solution using first-code migrations (as well as the reasoning behind no direct code first support) if you are using migrations or are in a situation where you are able to:

http://entityframework.codeplex.com/workitem/614

Create a non-clustered primary key index using EF CodeFirst. is a question that is relevant and also contains some information. Although it is for EF 4.1, it still applies to EF 6.

2
5/23/2017 12:23:47 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow