title: No Entity Framework provider found for the ADO.NET provider with invariant name 'MySql.Data.MySqlClient' - WCF
body: <p>I am following the tutoriel <a href="http://blog.netapsys.fr/tutoriel-wcf-partie-2/" rel="nofollow noreferrer">here</a> (in french) but I have this commun error coming when I am testing my WCF application with WcfTestClient.</p>
  
  <blockquote>
    <p>No Entity Framework provider found for the ADO.NET provider with
    invariant name 'MySql.Data.MySqlClient'. Make sure the provider is
    registered in the 'entityFramework' section of the application config
    file.</p>
  </blockquote>
  
  <p>I have one Library project for Entity Framework and one project for the WcfSelfHosting.</p>
  
  <p>The error is coming here:</p>
  
  <pre><code>public IEnumerable&lt;student&gt; GetAllStudentsOfCourseFinance()
  {
    return SchoolDataEntities.enrollements.Where(t =&gt; t.course.title == "Finance").Select(t =&gt; t.student);
  }
  </code></pre>
  
  <p>My App.config in the Library</p>
  
  <pre><code>&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=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
    &lt;/configSections&gt;
    &lt;entityFramework&gt;
      &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/&gt;
      &lt;providers&gt;
        &lt;provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6"/&gt;
        &lt;provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/&gt;
      &lt;/providers&gt;
    &lt;/entityFramework&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>My App.config in WcfSelfHosting project</p>
  
  <pre><code>&lt;configuration&gt;
      &lt;startup&gt; 
          &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /&gt;
      &lt;/startup&gt;
    &lt;connectionStrings&gt;
      &lt;add name="schooldataEntities" connectionString="metadata=res://*/Data.Model.csdl|res://*/Data.Model.ssdl|res://*/Data.Model.msl;provider=MySql.Data.MySqlClient;provider connection string=&amp;quot;server=localhost;user id=root;password=password;database=schooldata&amp;quot;" providerName="System.Data.EntityClient" /&gt;
    &lt;/connectionStrings&gt;
    &lt;system.serviceModel&gt;
      &lt;bindings&gt;
        &lt;basicHttpBinding&gt;
          &lt;binding name="BasicTextBinding" messageEncoding="Text" textEncoding="utf-8"&gt;
          &lt;/binding&gt;
        &lt;/basicHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name=""&gt;
            &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;services&gt;
        &lt;service name="WCFExampleLibrary.WCFServices.SchoolWCFService"&gt;
          &lt;endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicTextBinding" contract="WCFExampleLibrary.WCFServices.ISchoolWCFService"&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/WCFExampleLibrary.WCFServices/SchoolWCFService/" /&gt;
            &lt;/baseAddresses&gt;
          &lt;/host&gt;
        &lt;/service&gt;
      &lt;/services&gt;
    &lt;/system.serviceModel&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I added the Entityframework and  MySQL.Data.Entity.EF6 references in the WcfSelfHosting project.</p>