我有一个由SQL数据库支持的Azure移动服务。我已经很高兴地部署了几个星期,并使用EF Code First管理我的数据库。但现在,我撞到了一面砖墙,因此对移动服务的任何请求都打破了一个错误:Azure移动服务和EF代码优先 - 上下文已更改错误
The model backing the '[yourcontext]' context has changed since the database was created.
事情是,虽然它没有! 我已经试过如下:
1. Re-depoyed the service *several* times
2. Run ‘Add-Migration’ to see if it mystically picks up any new fields/properties
3. Run ‘Update-database’ which runs without any issues
4. Combinations of 2&3 over and over
5. Deleted the Migration History table
6. Deleted ALL tables from my DB and re-run update-database, which again completes without error
7. 6 then 3, which recreates the database
任何想法如何,我可以解决这个insantiy?
谢谢@BruceChen。查看我发布的答案,了解我最终如何运作。是你上面说的和其他一些事情的组合! – LDJ