public class CustomerMap : EntityTypeConfiguration{ public CustomerMap() { this.Property(o => o.UserName).HasColumnAnnotation("Index", new IndexAnnotation(new IndexAttribute() { IsUnique = true })); } }
本文共 313 字,大约阅读时间需要 1 分钟。
public class CustomerMap : EntityTypeConfiguration{ public CustomerMap() { this.Property(o => o.UserName).HasColumnAnnotation("Index", new IndexAnnotation(new IndexAttribute() { IsUnique = true })); } }
转载于:https://www.cnblogs.com/shiningrise/p/5563673.html