Skip to main content
 首页 » 编程设计

c#之Entity Framework 代码优先 6.0 : is there any annotations to add index to a column(s)

2024年02月13日14cyq1162

我是第一次使用 EF6。有这样一张 table :

public class DBBlog 
{ 
     public int Id { get; set; } 
     public string Title { get; set; }  //<-- need to be indexed 
} 

请多多指教

请您参考如下方法:

此功能是为 EF 6.1 添加的,并且已在夜间构建中可用。更多信息:

https://entityframework.codeplex.com/workitem/57