Reputation: 24833
I'm using EF6 for first time. having a table like this:
public class DBBlog
{
public int Id { get; set; }
public string Title { get; set; } //<-- need to be indexed
}
please advice
Upvotes: 1
Views: 1574
Reputation: 6476
The capability was added for EF 6.1 and is available already in nightly builds. For more information:
https://entityframework.codeplex.com/workitem/57
Upvotes: 3
Reputation: 1143
Unfortunately there is no DataAnnotion yet in EF to create indices. When you're using migrations, then you can adjust the created migration to add an Index manually.
Upvotes: 1