Add index with entity framework code first (CTP5)

前端 未结 4 1908
走了就别回头了
走了就别回头了 2020-12-13 01:02

Is there a way to get EF CTP5 to create an index when it creates a schema?

Update: See here for how EF 6.1 handles this (as pointed out by juFo belo

4条回答
  •  臣服心动
    2020-12-13 01:20

    Check my answer here Entity Framework Code First Fluent Api: Adding Indexes to columns this allows you to define multi column indexes by using attributes on properties.

提交回复
热议问题