I have a column \"Name\" that must be unqiue. No foreign key or anything like that.
EF 6.1 finally supports creating such indexes via Annotations. That has been disc
For me, using MVC 5 and EF 6, the key point was specifying a length on the string property where I wanted to place the index.
protected override void OnModelCreating(DbModelBuilder modelBuilder){
//More stuff
modelBuilder.Entity().Property(c => c.Name).HasColumnType("nvarchar").HasMaxLength(50);
modelBuilder.Entity().HasIndex(c => c.Name).IsUnique(true);
}