title: Dynamically change connection string in Asp.Net Core
body: <p>I want to change sql connection string in controller, not in ApplicationDbContext. I'm using Asp.Net Core and Entity Framework Core.</p>
  
  <p>For example:</p>
  
  <pre><code>public class MyController : Controller {
      private readonly ApplicationDbContext _dbContext
      public MyController(ApplicationDbContext dbContext)
      {
          _dbContext = dbContext;
      }
      private void ChangeConnectionString()
      {
      // So, what should be here?
      } }
  </code></pre>
  
  <p>How can I do this?</p>