Model backing a DB Context has changed; Consider Code First Migrations

前端 未结 13 573
旧巷少年郎
旧巷少年郎 2020-12-02 09:54

The model backing the \'MyDbContext\' context has changed since the database was created. Consider using Code First Migrations to update the database (http://

13条回答
  •  攒了一身酷
    2020-12-02 10:20

    In my case this error was caused by the existence of the _MigrationsHistory table in the database. Deleting that table fixed the problem. Not sure how that table got into our test environment database.

提交回复
热议问题