The model backing the 'ApplicationDbContext' context has changed since the database was created

前端 未结 21 1436
情话喂你
情话喂你 2020-12-02 07:24

First of all, I have not seen this error anywhere else and I guess it\'s not a replicate so please read the whole situation first.

Everything was working just fine

21条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-02 07:40

    simply the error means that your models has changes and is not in Sync with DB ,so go to package manager console , add-migration foo2 this will give a hint of what is causing the issue , may be you removed something or in my case I remove a data annotation . from there you can get the change and hopefully reverse it in your model.

    after that delete foo2 .

提交回复
热议问题