public class CustomerMap : EntityTypeConfiguration<Customer> { public CustomerMap() { this.Property(o => o.UserName).HasColumnAnnotation("Index", new IndexAnnotation(new IndexAttribute() { IsUnique = true })); } }
public class CustomerMap : EntityTypeConfiguration<Customer> { public CustomerMap() { this.Property(o => o.UserName).HasColumnAnnotation("Index", new IndexAnnotation(new IndexAttribute() { IsUnique = true })); } }