title: Using MySQL the ADO.NET provider with invariant name 'MySql.Data.MySqlClient' is either not registered in the machine or application config file
body: <p>I am working on creating <code>Rest API</code> using the visual studio in asp.net MVC. The database I am using is <code>MySQL</code>. I am getting below error while running the API. </p>
  
  <pre><code>Severity    Code    Description Project File    Line    Suppression State
  Error       Error 175: The ADO.NET provider with invariant name 'MySql.Data.MySqlClient' is either not registered in the machine or application config file, or could not be loaded. See the inner exception for details.   DataAccess  D:\Work\DOT NET API\RestWithMySQL\DataAccess\ProductsModel.edmx 7
  </code></pre>
  
  <p>I have two projects in my single solution. <code>Data Access</code> project in which I have added the model and <code>RestWithMySQL</code> project in which I have added my control and the model is added as a reference in it.</p>
  
  <p>When I click on the error I am redirected to the following section</p>
  
  <pre><code>&lt;edmx:StorageModels&gt;
    &lt;Schema Namespace="ProductsModel.Store" Provider="MySql.Data.MySqlClient" ProviderManifestToken="5.5" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl"&gt;
      &lt;EntityType Name="product"&gt;
        &lt;Key&gt;
          &lt;PropertyRef Name="Id" /&gt;
        &lt;/Key&gt;
        &lt;Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" /&gt;
        &lt;Property Name="Name" Type="varchar" MaxLength="100" /&gt;
        &lt;Property Name="Price" Type="int" /&gt;
        &lt;Property Name="Category" Type="varchar" MaxLength="100" /&gt;
      &lt;/EntityType&gt;
      &lt;EntityContainer Name="ProductsModelStoreContainer"&gt;
        &lt;EntitySet Name="product" EntityType="Self.product" Schema="accurate_dev" store:Type="Tables" /&gt;
      &lt;/EntityContainer&gt;
    &lt;/Schema&gt;
  &lt;/edmx:StorageModels&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/EUv04.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EUv04.png" alt="enter image description here"></a></p>
  
  <p>My config file is below </p>
  
  <pre><code>&lt;connectionStrings&gt;
  &lt;!--&lt;add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-RestWithMySQL-20170911031521.mdf;Initial Catalog=aspnet-RestWithMySQL-20170911031521;Integrated Security=True" providerName="System.Data.SqlClient" /&gt;--&gt;
  &lt;add name="ProductEntities" connectionString="metadata=res://*/ProductsModel.csdl|res://*/ProductsModel.ssdl|res://*/ProductsModel.msl;provider=MySql.Data.MySqlClient;provider connection string=&amp;quot; Server=localhost; Uid=root; Database=accurate_dev; Port=3306;SslMode=Preferred" providerName="MySql.Data.MySqlClient" /&gt;
   &lt;!--&lt;remove name="LocalMySqlServer" /&gt;&lt;add name="ProductEntities" connectionString="metadata=res://*/ProductsModel.csdl|res://*/ProductsModel.ssdl|res://*/ProductsModel.msl;provider=MySql.Data.MySqlClient;provider connection string=&amp;quot; Server=localhost;Uid=root;Pwd=;Database=accurate_dev;" providerName="MySql.Data.MySqlClient" /&gt;--&gt;
  </code></pre>
  
  <p></p>
  
  <p>I have searched for every solution related to it but still can't able to get the desired result.</p>
  
  <p>Any help would be highly appreciated.</p>