title: How to change an EF connection string, based on subdomain of MVC web site?
body: <p>I have an EF5 ASP.NET MVC 3 (Razor) web site, running under IIS7.  Now I want to be able to change the connection string to the MSSQL database depending on the subdomain of the URL, e.g. <code>foo.mydomain.com</code> should connect to my "Foo" database, and <code>bar.mydomain.com</code> should connect to the "Bar" database.</p>
  
  <p>Obviously the DNS records are set up so that they all point to the same web site.</p>
  
  <p>What's the most efficient way of achieving this?</p>