EF 5启用的迁移:无上下文类型是在装配中 [英] EF 5 Enable-Migrations : No context type was found in the assembly

查看:281
本文介绍了EF 5启用的迁移:无上下文类型是在装配中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有4个项目:

Toombu.Entities : all models are there
Toombu.DataAccess: Mapping, Repository and ToombuContext
Toombu.Logique : Logic of my application
Toombu.Web : MVC 4 application. With all others DLL.

我试图使移民的 Toombu.Web ,但我有这个错误:

No context type was found in the assembly

我该如何进行迁移?

How can I enable migration ?

推荐答案

在软件包管理器控制台中使用-ProjectName选项:

use -ProjectName option in Package Manager Console:

Enable-Migrations -ProjectName Toombu.DataAccess -StartUpProjectName Toombu.Web -Verbose

这篇关于EF 5启用的迁移:无上下文类型是在装配中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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