Indexing Extensions for EF6
Latest commit 01f4797 Jul 4, 2015 @mj1856 Update
Failed to load latest commit information.
EntityFramework.IndexingExtensions Version 1.0.1 Jun 14, 2015
.gitattributes Initial commit Mar 22, 2015
.gitignore Initial commit Mar 22, 2015
LICENSE Initial commit Mar 22, 2015


Indexing Extensions for Entity Framework 6


PM> Install-Package EntityFramework.IndexingExtensions


public class MyDataContext : DbContext
  protected override void OnModelCreating(DbModelBuilder modelBuilder)
        .HasIndex("IX_Customers_Name",          // Provide the index name.
            e => e.Property(x => x.LastName),   // Specify at least one column.
            e => e.Property(x => x.FirstName))  // Multiple columns as desired.

        .HasIndex("IX_Customers_EmailAddress",  // Supports fluent chaining for more indexes.
            IndexOptions.Unique,                // Supports flags for unique and clustered.
            e => e.Property(x => x.EmailAddress)); 


After publishing this, I was informed that there is an active pull request here to add something similar directly into Entity Framework. If/when that is merged, you should probably use it instead. Though, this one should continue to work without issue.