【发布时间】:2021-07-08 20:05:23
【问题描述】:
我想创建微服务架构解决方案,因此我为我的解决方案添加了一些服务。我的所有服务都必须在我的数据库中的模型中有一个表,因此我添加了写入此迁移以从我的数据库中添加一个表:
Scaffold-DbContext -Connection "Server=DESKTOP-9Q51Q00\TMF;Database=DataModelSection;Trusted_Connection=True;" -Provider Microsoft.EntityFrameworkCore.SqlServer -OutputDir Model -Tables tblCommonBaseType -Context "Contexts"
我想要从我的数据库中成功获得的表:
但是当我创建项目 #2 并且我想使用此迁移并添加另一个表时,我收到错误并且构建失败。
Scaffold-DbContext -Connection "Server=DESKTOP-9Q51Q00\TMF;Database=DataModelSection;Trusted_Connection=True;" -Provider Microsoft.EntityFrameworkCore.SqlServer -OutputDir Model -Tables tblCommonBaseData -Context "Contexts"
【问题讨论】:
-
打开错误窗口并检查问题所在。
-
无法加载程序集“CommonBaseData”。确保它被启动项目“CommonBaseType”引用。
标签: c# asp.net-core entity-framework-core migration microservices