Hi ErumMirza-7683,
According to my understanding, the context is related to a single database. There is even no easy way to hack it, because the context can still only create queries for a single database, so if you want to access multiple databases, you need to create a context for each database (there is no cross-context query or relationship).
But I also found some methods or suggestions in these threads you can refer to.
EF Core and Multiple Databases
Performing projections on multiple databases with only one dbContext
Best Regards,
Daniel Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.