Entity Framework Code First Fluent Api: Adding Indexes to columns
After Migrations was introduced in EF 4.3 you can now add indexes when modifying or creating a table. Here is an excerpt from the EF 4.3 Code-Based Migrations Walkthrough from the ADO.NET team blog namespace MigrationsCodeDemo.Migrations { using System.Data.Entity.Migrations; public partial class AddPostClass : DbMigration { public override void Up() { CreateTable( “Posts”, c => … Read more