I need to change an order of code first generated columns in EF Core. I have tried deleting database and re-creating it with dotnet ef database update
command, but it keeps this weird order. Is there a way to fix an order without applying attributes?
CodePudding user response:
EF Core 6 has this possibility https://github.com/dotnet/EntityFramework.Docs/issues/3469
builder.Property(x => x.Some)
.HasColumnOrder(1);
Prior versions requires defining order via ColumnAttribute