参考:http://blog.csdn.net/sxycxwb/article/details/12186159 0.删除之前的数据库 1.Run the Enable-Migrations command in Package Manager Console 进入(PM)软件包管理控制台 (视图——>其他窗口——>程序包管理控制台)输入以下指令:Enable-Migrations 会提示:"No context type was found in the assembly"…
一.打开程序包管理器控制台 当你的实体模型与数据库架构不一致时,引发以下错误:The model backingthe 'SchoolContext' context has changed since the database was created.Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269)百度搜索Code First M…