问题描述
我需要使用不同的连接字符串在同一项目中管理多个上下文,我使用的是EF Core Power Tools,但是此工具正在为整个项目生成文件配置,值得注意的是,我正在使用Database First和在另一个类库项目中将实体与dbcontext分开.
I need to manage multiple context in the same project with different connection strings, I'm using EF Core Power Tools, but this tool it's generating a file config for whole project, worth noting that I'm working with Database First and separeting the entities from dbcontext in another class library project.
推荐答案
根据此处描述的模式将唯一名称分配给配置文件: https://github.com/ErikEJ/EFCorePowerTools/wiki/Reverse-Engineering#using-multiple-dbcontexts-在同一项目中
Assign a unique name to the config file according to the pattern described here: https://github.com/ErikEJ/EFCorePowerTools/wiki/Reverse-Engineering#using-multiple-dbcontexts-in-the-same-project
这篇关于如何使用EF Core Power Tools在同一项目中管理多个dbcontext?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!