Additional information: The model backing the 'StuInfoDBContext' context has changed since the datab
2015-03-26 00:07
435 查看
异常:
Additional information: The model backing the 'StuInfoDBContext' context has changed since the database was created. Consider using Code First Migrations to update the database
![](http://img.blog.csdn.net/20150326000142085?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvVEtEd2F2ZTUyMA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)
解决办法:
Global.asax文件中加:Database.SetInitializer<StuInfoDBContext>(null);
Additional information: The model backing the 'StuInfoDBContext' context has changed since the database was created. Consider using Code First Migrations to update the database
解决办法:
Global.asax文件中加:Database.SetInitializer<StuInfoDBContext>(null);
using System.Data.Entity; using Iweb.Areas.SiteInfo.Models; namespace Iweb { // Note: For instructions on enabling IIS6 or IIS7 classic mode, // visit http://go.microsoft.com/?LinkId=9394801 public class MvcApplication : System.Web.HttpApplication { protected void Application_Start() { Database.SetInitializer<StuInfoDBContext>(null); AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); } } }
相关文章推荐
- MVC中“The model backing the '***Context' context has changed since the database was created. ”的问题处理
- The model backing the <Database> context has changed since the database was created.
- EF Code First(提示The model backing the '***' context has changed since the database was created.)
- The model backing the 'XXX' context has changed 错误
- iOS 协同开发出fatal error: file 'XX-Prefix.pch' has been modified since the precompiled header was built
- Model backing a DB Context has changed; Consider Code First Migrations
- Source insight上修改samba共享ubuntu上内核源程序文件出现"Confirm by typing ‘yes' below"、"has been changed outside of the editor. Do you want to
- Xcode 6 *.h' has been modified since the precompiled header
- iOS 协同开发出fatal error: file 'XX-Prefix.pch' has been modified since the precompiled header was built
- File '/Applications/Xcode has been modified since the precompiled header was built
- UIButton.h' has been modified since the precompiled header
- The model backing the 'ProductContext' context has changed since the database was created. EF6
- warning C4996: 'swprintf': swprintf has been changed to conform with the ISO C standard, adding an e
- arm环境下编译出现下面警告的解决办法 note: the mangling of 'va_list' has changed in GCC 4.4
- make[1]: Warning: File `libbb/Makefile.in' has modification time 3.2e+04 s in the future 错误
- Error creating bean with name 'StuService' defined in ServletContext resource [/WEB-INF/applicationC
- 【Android异常】The specified child already has a parent. You must call removeView() on the child's paren
- File `Makefile' has modification time 1.8e+06 s in the future这种警告的原因分析及解决方法
- the project file '' has been renamed or is no longer in the solution 解决办法
- VS2010 The project file ' ' has been renamed or is no longer in the solution