Add-Migration Created Columns Alphabetically Asp.Net Core 2.0

Viewed 1149

I have created a model and run command Add-Migration in PMC. it created columns in alphabetically order in migration. After updating database sqlserver table are also in alphabetically order. I want the same order which i used in my original model instead of alphabetical order. I don't want to go with this.

[Key, Column(Order=0)]
public int MyFirstKeyProperty { get; set; }

[Column(Order=1)]
public int MySecondKeyProperty { get; set; }

As i have 70 properties in my table and some time it may exceed. and i am not sure it works or not. I have searched a lot and just know that it is issue with .Net Core2.0. is it ture? Any solution? Thanks.

2 Answers
Related