Entity Framework creates empty migration but insists that my model is different

后端 未结 2 935
伪装坚强ぢ
伪装坚强ぢ 2021-01-12 08:56

Today is a sad day. First thing today I saw EF exception saying that \"The model backing the \'DomainContext\' context has changed since the database was created.\"

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-12 09:39

    I had the same problem today. I added before the problem appeared a ViewModel, a View and Html.EnableClientValidation()

    There was no Model changes at all! I did a dummy change, like @Guilleon advised, and created a working Migration... but it didn't help.

    Then I restarted the Visual Studio and everything worked again. It must be a glitch

提交回复
热议问题