title: Inject DbContext when database name is only know when the controller action is called
body: <p>I have a WebAPI/EF Core back-end application with several possible client databases to connect to (each of the same schema, but only one at a time).</p>
  
  <p>Knowledge of which database to connect to will not be known until a WebAPI controller is accessed. By that time, it will be too late to add the DBContext as an injectable object using the call to services.AddDbContext&lt;>() in the ConfigureServices() method of the starup.cs file.</p>
  
  <p>Since each instance of DbContext is isolated per request, is there anything wrong with instantiating the DbContext directly from the controller's action instead of passing it through using DI? </p>