У меня есть этот код в EF 6.2
public class ClientNotificationMap : EntityTypeConfiguration<ClientNotification>
{
public ClientNotificationMap()
{
HasKey(x => x.RelationalId);
Property(x => x.SubscriptionId)
.IsRequired()
.HasMaxLength(400)
.HasColumnAnnotation(IndexAnnotation.AnnotationName, new IndexAnnotation(new IndexAttribute()));
}
}
, который я хочу перенести в Core 2.2
public class ClientNotificationMap : IEntityTypeConfiguration<ClientNotification>
{
public ClientNotificationMap()
{
}
public void Configure(EntityTypeBuilder<ClientNotification> builder)
{
builder.HasKey(x => x.RelationalId);
builder.Property(x => x.SubscriptionId)
.IsRequired()
.HasMaxLength(400)
.HasColumnAnnotation(IndexAnnotation.AnnotationName, new IndexAnnotation(new IndexAttribute()));
}
}
Кто-нибудь знает, как изменить
.HasColumnAnnotation(IndexAnnotation.AnnotationName, new IndexAnnotation(new IndexAttribute()));
В Core это не поддерживается.Также я не нахожу ничего относительно Интернета.