title: ASP.NET Core re-registering dbcontext after changing connection string
body: <p>I have an ASP.NET Core application that has a connection string key in the config file.</p>
  
  <p>If its value is not correct (for example database name, ip address, etc), i wish to be able to re-register this dbcontext service with the new connection string after the user has changed it manually in the config file.</p>
  
  <p>How to achieve this? Is this considered a bad practice?</p>
  
  <p>Thank you.</p>