Microsoft Technologies based on the .NET software framework. Miscellaneous topics that do not fit into specific categories.
Jack - I found the link below that changes the database at runtime by passing the connection string, with either the Live or Test database name in the string. I've implemented it and it seems to work ok so far.
As far as your suggestion - I had thought about doing that, but I didn't think it was efficient to check which database to connect to each time I access the dbcontext.
https://www.codeproject.com/Tips/798392/Changing-Databases-at-Run-time-using-Entity-Framew