How to change registered (Simple Injector) DbContext's connection string after user's authorization?
问题 I'm building ASP.NET Core Web Api with Simple Injector and have the following problem: The data for each user is stored in his individual base (but with the same schema), which is known only after he authorizes himself. So... I can give DbContext it's proper connection string only after user's authorization. What is the best way to accomplish this? For now I am storing the connection string in HttpContext custom claim and am refering to it with a use of a static helper class in DbContext 's