© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
3 replies
stayclaxxy

❔ EFCore in .net 6 Web API - using same context/model for multiple environments simultaniously.

I am trying to write a Web API, one of the GET methods in a controller needs to return data from the same table, but in multiple environments. All of the envrionments' schemas are the same (except login credentials/connection string). I was wondering if there is a way to use the same context and table model class to query all 3 environments with EFCore for the sake of keeping the code dry and clean. TIA
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ SignalR in .Net 6 Web API
C#CC# / help
3y ago
✅ ASP.NET Core Web API Model Creation.
C#CC# / help
10mo ago
Using base class as relationship definition in model ASP.net WEB API
C#CC# / help
3y ago
EFCore : multiple contraints for the same navigation property
C#CC# / help
3y ago