title: Connection string not getting detected in ADO.NET Entities
body: <p>I for the first time tried the ADO.Net Data entity model and would like to work wiht linq on it.  I did my entity connection and following code to test connection:</p>
  
  <pre><code>Public Function SaveContact(ByVal ContactValue As Contact, ByVal IsNew As Boolean) As String Implements IContactService.SaveContact
      Dim db As New salessolEntities
      db.Database.Connection.Open()
      db.Database.Connection.Close()
      Return Nothing
  End Function
  </code></pre>
  
  <p>However, I am getting the following error:</p>
  
  <blockquote>
    <p>No connection string named 'salessolEntities' could be found in the
    application config file.</p>
  </blockquote>
  
  <p>The connection string is correctly set in app.config:
  Default version(auto generated):</p>
  
  <pre><code>  &lt;connectionStrings&gt;
      &lt;add name="SalesSolWcfLib.My.MySettings.DBConnection" connectionString="server=localhost;User Id=root;password=surpavan;database=salessol;Persist Security Info=True;Old Guids=True" providerName="MySql.Data.MySqlClient" /&gt;
      &lt;add name="salessolEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=MySql.Data.MySqlClient;provider connection string=&amp;quot;server=localhost;user id=root;password=surpavan;database=salessol;persist security info=True;old guids=True&amp;quot;" providerName="System.Data.EntityClient" /&gt;
    &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>A small modifiction:</p>
  
  <pre><code>  &lt;connectionStrings&gt;
      &lt;add name="SalesSolWcfLib.My.MySettings.DBConnection" connectionString="server=localhost;User Id=root;password=surpavan;database=salessol;Persist Security Info=True;Old Guids=True" providerName="MySql.Data.MySqlClient" /&gt;
      &lt;add name="salessolEntities" connectionString="server=localhost;User Id=root;password=surpavan;database=salessol;Persist Security Info=True;Old Guids=True" providerName="MySql.Data.MySqlClient" /&gt;
    &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>Another modification:</p>
  
  <pre><code>&lt;connectionStrings&gt;
  
          &lt;add name="SalesSolWcfLib.My.MySettings.DBConnection" connectionString="server=localhost;User Id=root;password=surpavan;database=salessol;Persist Security Info=True;Old Guids=True" providerName="MySql.Data.MySqlClient" /&gt;
          &lt;add name="SalesSolWcfLib.My.MySettings.salessolEntities" connectionString="server=localhost;User Id=root;password=surpavan;database=salessol;Persist Security Info=True;Old Guids=True" providerName="MySql.Data.MySqlClient" /&gt;
        &lt;/connectionStrings&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/AJErO.png" alt="Tables That got picked up"></p>
  
  <p>Entire App.config:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
      &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
    &lt;/configSections&gt;
    &lt;connectionStrings&gt;
      &lt;add name="SalesSolWcfLib.My.MySettings.DBConnection" connectionString="server=localhost;User Id=root;password=surpavan;database=salessol;Persist Security Info=True;Old Guids=True" providerName="MySql.Data.MySqlClient" /&gt;
      &lt;add name="SalesSolWcfLib.My.MySettings.salessolEntities" connectionString="server=localhost;User Id=root;password=surpavan;database=salessol;Persist Security Info=True;Old Guids=True" providerName="MySql.Data.MySqlClient" /&gt;
        &lt;/connectionStrings&gt;
        &lt;appSettings&gt;
          &lt;add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" /&gt;
          &lt;add key="ClientSettingsProvider.ServiceUri" value="" /&gt;
        &lt;/appSettings&gt;
        &lt;system.web&gt;
          &lt;compilation debug="true" /&gt;
          &lt;membership defaultProvider="ClientAuthenticationMembershipProvider"&gt;
            &lt;providers&gt;
              &lt;add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" /&gt;
            &lt;/providers&gt;
          &lt;/membership&gt;
          &lt;roleManager defaultProvider="ClientRoleProvider" enabled="true"&gt;
            &lt;providers&gt;
              &lt;add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" /&gt;
            &lt;/providers&gt;
          &lt;/roleManager&gt;
        &lt;/system.web&gt;
        &lt;!-- When deploying the service library project, the content of the config file must be added to the host's 
        app.config file. System.Configuration does not support config files for libraries. --&gt;
        &lt;system.serviceModel&gt;
          &lt;services&gt;
            &lt;service name="SalesSolWcfLib.Service1"&gt;
              &lt;endpoint address="" binding="basicHttpBinding" contract="SalesSolWcfLib.IService1"&gt;
                &lt;identity&gt;
                  &lt;dns value="localhost" /&gt;
                &lt;/identity&gt;
              &lt;/endpoint&gt;
              &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt;
              &lt;host&gt;
                &lt;baseAddresses&gt;
                  &lt;add baseAddress="http://localhost:8733/Design_Time_Addresses/SalesSolWcfLib/Service1/" /&gt;
                &lt;/baseAddresses&gt;
              &lt;/host&gt;
            &lt;/service&gt;
            &lt;service name="SalesSolWcfLib.ContactService"&gt;
              &lt;endpoint address="" binding="basicHttpBinding" contract="SalesSolWcfLib.IContactService"&gt;
                &lt;identity&gt;
                  &lt;dns value="localhost" /&gt;
                &lt;/identity&gt;
              &lt;/endpoint&gt;
              &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt;
              &lt;host&gt;
                &lt;baseAddresses&gt;
                  &lt;add baseAddress="http://localhost:8733/Design_Time_Addresses/SalesSolWcfLib/ContactService/" /&gt;
                &lt;/baseAddresses&gt;
              &lt;/host&gt;
            &lt;/service&gt;
          &lt;/services&gt;
          &lt;behaviors&gt;
            &lt;serviceBehaviors&gt;
              &lt;behavior&gt;
                &lt;!-- To avoid disclosing metadata information, 
                set the values below to false before deployment --&gt;
                &lt;serviceMetadata httpGetEnabled="True" httpsGetEnabled="True" /&gt;
                &lt;!-- To receive exception details in faults for debugging purposes, 
                set the value below to true.  Set to false before deployment 
                to avoid disclosing exception information --&gt;
                &lt;serviceDebug includeExceptionDetailInFaults="False" /&gt;
              &lt;/behavior&gt;
            &lt;/serviceBehaviors&gt;
          &lt;/behaviors&gt;
        &lt;/system.serviceModel&gt;
        &lt;entityFramework&gt;
          &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"&gt;
            &lt;parameters&gt;
              &lt;parameter value="v11.0" /&gt;
            &lt;/parameters&gt;
          &lt;/defaultConnectionFactory&gt;
        &lt;/entityFramework&gt;
      &lt;/configuration&gt;
  </code></pre>
  
  <p>Please advise on which part I went wrong, this is a WCF project with Mysql.  My manual connection with "SalesSolWcfLib.My.MySettings.DBConnection" works well, but with ado.net I am facing this issue.  Please correct me where I went wrong.</p>