我最近开始使用MVC 4
开始分区解决方案的工作,我使用Structuring Solutions and Projects和Adding an existing Visual Studio solution to another solution设置了我的解决方案。我的系统全部建立,可以构建,并且我已启用两种解决方案的迁移。每个解决方案有4个项目(域,数据,UnitTests和WebUI),子解决方案具有来自主解决方案的参考。数据层包含所有的存储库和DbContext类。每个解决方案都有自己的连接字符串,因此我打算为添加到系统的每个解决方案分别创建数据库。无法将文件附加为分区解决方案的子解决方案中的数据库
我试图使用Update Database -Verbose
来更新Package Manager Console
中的数据库。这适用于主解决方案,但尚未与子解决方案一起使用。迁移文件位于数据层。
注:我跑Update-Database -Verbose
Using StartUp project Master.WebUI and Using NuGet project Master.Data
(母液)
Using StartUp project Child.WebUI and Using NuGet project Child.Data
(儿童解决方案)
我应该怎么做,使这项工作?
我不太解决这个问题,但我所做的就是前重新'儿童solution',使第一'Updat,Database'将它添加到'Master Solution' – Komengem 2013-03-27 01:59:37