title: Dynamically generating databases in MVC3 EF
body: <p>My connectionstring looks like this:</p>
  
  <pre><code>&lt;add name="MyDbContext"
       connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;Database=MyDb;User Instance=false"
       providerName="System.Data.SqlClient" /&gt;
  </code></pre>
  
  <p>What would be the best way to dynamically set the database based on the url provided by the user? In other words, how would I dynamically change the MyDb parameter? I'm using MVC3 with the Entity Framework and SQL Express as database server.</p>