- Published on
- Authors
- koskila
- Tags
- code-firstcefef6sql
Fixing the error: "Column XX in table dbo.YY is of a type that is invalid for use as a key column in an index."
While using Entity Framework and code-first migrations, Entity Framework (EF) creates the indexes for you - but what if you need to create a custom one, explicitly based on a certain field/column? Then you'll have to tell EF which one to use as a key column.
