Can I programmatically determine the database “context” to use based on user credentials?
问题 This is a followup to the question here, where the answer seems to refer to an overly-complicated and overly-specific (EF, which I'm not using - not even using an ORM). There has to be a more straightforward way around this common scenario than the smoke, mirrors, and sorcery hinted at in that answer. Note: I encased "context" in parenthesis because I'm not using EF, so it is not a literal "dbcontext" that I'm talking about here. So I got to wondering: Could I set a global variable for each