我在我的解决方案中安装了EF:
PM> Install-Package EntityFramework -IncludePrerelease
之后,我尝试执行enable migration命令,但它不起作用:
PM> enable-migrations
错误:
No context type was found in the assembly 'MyProjectName'.
答案 0 :(得分:1)
从下拉菜单默认项目中指定目标项目(具有DbContext
派生类),或者:
PM> enable-migrations -Project <MyProjectName>