My connectionstring looks like this:
<add name="MyDbContext"
connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;Database=MyDb;User Instance=false"
providerName="System.Data.SqlClient" />
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.
Have you tried this constructor DbContext(String)?