title: ASP.NET Entity Framework and connection strings
body: <p>I have just started playing with the ASP.NET MVC.</p>
  
  <pre><code> &lt;add name="ApplicationServices" connectionString="Data Source=localhost;Port=3306;Database=test;User id=root;Password=admin;" providerName="MySql.Data.MySqlClient" /&gt;
  &lt;add name="testEntities" connectionString="metadata=res://*/Models.testDB.csdl|res://*/Models.testDB.ssdl|res://*/Models.testDB.msl;provider=MySql.Data.MySqlClient;provider connection string=&amp;quot;server=localhost;port=3306;database=test;User Id=root;password=admin&amp;quot;" providerName="System.Data.EntityClient" /&gt;
  </code></pre>
  
  <p>VS automatically creates connection strings on web.config with the DB details when you add a ADO entity data model. The problem is that I use ASP.NET user/privileges schema which uses "ApplicationServices" connection string which exists by default. All of those tables as well as my application tables exists on the same DB. I want the DB details(host/user/pass) to come from a single connection string entry. Or even if there are multiple connection string entries is it possible to get the DB details alone from a single source.</p>
  
  <p>I come from the PHP world and couldn't figure out how to get it done from the other similar threads that I had bumped into.</p>
  
  <p>Thanks</p>