asp.net mvc 4的数据库迁移 [英] Database migration of an asp.net mvc 4

查看:101
本文介绍了asp.net mvc 4的数据库迁移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请我执行数据库迁移但是下面的错误显示upse.A我可以做什么

Please i want to perform database migration but the bellow error show upse.what can i do

More than one context type was found in the assembly 'AccfOutReach2013'.
To enable migrations for AccfOutReach2013.Models.AccfOutReach2013DBContext, use Enable-Migrations -ContextTypeName AccfOutReach2013.Models.AccfOutReach2013DBContext.
To enable migrations for AccfOutReach2013.Models.UsersContext, use Enable-Migrations -ContextTypeName AccfOutReach2013.Models.UsersContext.





删除SHOUTING - OriginalGriff [/编辑]



[edit]SHOUTING removed - OriginalGriff[/edit]

推荐答案

自解释。如果解决方案中有多个项目,则重新启动VS然后使用特定项目,然后使用Enable-Migrations -ContextTypeName与上下文类型一致。因为它可能与存在的多种上下文类型冲突。
It is self explanatory . Restart your VS and then use the specific project if multiple projects are there in the solution and then use Enable-Migrations -ContextTypeName be specificwith the context type. As it might conflict with multiple context types present.


这篇关于asp.net mvc 4的数据库迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆