Search code examples
c#entity-frameworkvisual-studio-2012sql-server-ce

How to specify index column in Entitiy Framework Designer


I am currently working on my first project based on Entity Framework 6 with VS2012 using a SQL Server Compact database (model first). Currently I am wondering how to declare an Entity column to be indexed (not unique values) in the database without being the primary key.

Thank you for any hints.


Solution

  • You can't specify an index through the designer. This can only be specified in the database, if you do Database-First, or through the model, if you do Code First. My preference is Database First, but your mileage may vary.