I'm trying to implement a way to have multiple databases (identical databases, all have same tables etc.) but I need them to be separate thus multiple DBs. Is there a way to have a single DBContext and repository pattern that can interact with all of them (who have different connection strings) from the controller.
(all the DBs are the same just different DB name)
Ex. I have 3 controllers/endpoints api/course1
, api/course2
, and api/course3
Each course has a database. I've been looking at various documentation but having difficulty on how I can have it done with a repository pattern.
Thank you!