Index
創建索引
[Index("PostRatingIndex")]
public int Rating { get; set; }
[Index]
public int Rating { get; set; }
或者
modelBuilder.Entity<MyEntity>()
.Property(e => e.MyProperty)
.HasColumnAnnotation(
IndexAnnotation.AnnotationName,
new IndexAnnotation(new IndexAttribute()));