title: How to set default connection string in ASP.NET Web API controller dynamically?
body: <p>I have a WebAPI service set up, initially it was only set up with a single connection string so was defaulting to this single connection to retrieve the data from.</p>
  
  <p>I have now added a second connection string to the web.config and wanted to know how a user can pass the name of the connection to be used when making a call in order for the service to point to the selected database. At the moment it will only point to the first connection string in the file.</p>
  
  <p>I have seen some solutions where a string variable is being set using the configuration manager and being passed down to the Data access layer, but what I am after is a way to not have to pass down an extra variable and for the API to set the selected connection string as the default and for it to point to that db automatically, similar to if there was only one connection string.</p>