EF Code First(提示The model backing the '***' context has changed since the database was created.)
来源:互联网 发布:数组和元组 编辑:程序博客网 时间:2024/05/17 22:28
错误消息:
The model backing the '***' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).
错误原因:
(1)数据模型发生改变,而没有更新到数据库导致此问题。
事实上我遇到的情况不是原因(1),而是(2)造成的
(2)更新到数据库 用的EF 6.1.0 ,而数据访问层用的是EF 6.0.2
解决方法:
(1)用Code First 更新数据库,命令如下:
Add-Migration
Update-Database -Verbose
(2)数据访问层换成EF 6.1.0 ,问题解决
0 0
- EF Code First(提示The model backing the '***' context has changed since the database was created.)
- MVC中“The model backing the '***Context' context has changed since the database was created. ”的问题处理
- Additional information: The model backing the 'StuInfoDBContext' context has changed since the datab
- The model backing the 'XXX' context has changed 错误
- The parent virtual disk has been modified since the child was created
- VMWare The parent virtual disk has been modified since the child was created
- 解决webdriver(Element not found in the cache - perhaps the page has changed since it was looked up )
- file ' ' has been modified since the precompiled header ' ' was built
- has been modified since the precompiled header… was built
- Selenium Webdriver : Element not found in the cache - perhaps the page has changed since it
- Backing Up and Restoring the Database
- 导入Android工程提示The project was not built since
- 修改/proc/sys/kernel/core_uses_pid出现WARNING: The file has been changed since reading it!!!
- The context cannot be used while the model is being created
- The First Context
- redo the auto created code
- Should I design the application or model (database) first?
- listview提示The content of the adapter has changed but ListView did not receive a notification
- centOS下mysql-ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- c#中执行dos命令
- 打造实用绩效考核(深圳站 2014-6-21)
- pythonchallenge level3--python2.7
- 非域环境下搭建Project Server 2007后,账户新建过程及新建后出现错误:拒绝访问的解决办法
- EF Code First(提示The model backing the '***' context has changed since the database was created.)
- SpringMVC 使用jndi 多个数据源且利用AbstractRoutingDataSource实现动态数据源切换
- 字符串的编辑距离
- [leetcode]Merge k Sorted Lists
- Cocos2D-X2.2.3学习笔记12(瞬时动作)
- hibernate查询结果返回Map集合
- Java内存分配、管理小结
- Memcached 并发控制 CAS 协议
- 使用poi解析Excel