I have an application that uses Entity Framework 6 to connect to an SQL Server database. We need to change this to also use a PostgreSQL database at the same time. What I'm after is three DbContext. One that always connects to SQL Server, one that always connects to PostgreSQL and one that changes which database it uses depending on a config setting. I'm confused as to how I would set up these connections. The code we have passes a connection string directly into the DBContext constructor.
The connection string being passed has no information about the database type. It is something like this:
"Server=example;Database=MyDb;Trusted_Connection=True;"