Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to manage multiple dbcontext in same project with EF Core Power Tools?

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.

DataAccess Layer

Entities Layer

like image 291
ftinococ45 Avatar asked Oct 22 '25 09:10

ftinococ45


1 Answers

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

like image 72
ErikEJ Avatar answered Oct 24 '25 00:10

ErikEJ



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!