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

前端 未结 13 596
旧巷少年郎
旧巷少年郎 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:24

    Entity Framework detects something about the model has changed, you need to do something to the database to get this work. Solution: 1. enable-migrations 2. update-database

提交回复
热议问题