Entity framework 支持';myDBContext';自创建数据库以来,上下文已更改。考虑使用代码第一迁移来更新数据库
我对实体做了一些更改,并在packageManager控制台中成功地执行了“更新数据库-详细”,我可以看到azure数据库中反映的更改 然后我对azure云进行了部署,我从azure云收到了错误消息Entity framework 支持';myDBContext';自创建数据库以来,上下文已更改。考虑使用代码第一迁移来更新数据库,entity-framework,azure,azure-sql-database,Entity Framework,Azure,Azure Sql Database,我对实体做了一些更改,并在packageManager控制台中成功地执行了“更新数据库-详细”,我可以看到azure数据库中反映的更改 然后我对azure云进行了部署,我从azure云收到了错误消息 "The model backing the 'myDBContext' context has changed since the database was created. Consider using Code First Migrations to update the database"
"The model backing the 'myDBContext' context has changed since the database was created. Consider using Code First Migrations to update the database"
我尝试设置Configuration.AutoDetectChangesEnabled=false并重新部署
但我还是犯了同样的错误
请帮助..我通过添加
Database.SetInitializer(null)代码>到Global.asax.cs中的应用程序_Start()可能的重复