title: Entity Framework 6 and MySQL, model first
body: <p>I have a problem using <strong>Entity Framework 6</strong> with <strong>MySQL</strong> and doing so using <strong>model/database-first</strong> technique in <strong>ASP.NET C# MVC 3</strong>.</p>
  
  <p>The current situation is that I’m getting the error:</p>
  
  <pre><code>Keyword not supported.
  Parameter name: metadata
  </code></pre>
  
  <p>The metadata is specified in the connection string in the web.config –file:</p>
  
  <pre><code>&lt;add name="SiteNameContainer" 
    connectionString="metadata=res://*/Models. SiteName.csdl|
      res://*/Models. SiteName.ssdl|
      res://*/Models. SiteName.msl;
      provider=MySql.Data.MySqlClient;
      provider connection string='server=127.0.0.1;
      user id=fire;password=fire_db;
      database=fire_dotnet'" 
    providerName="MySql.Data.MySqlClient" /&gt;
  </code></pre>
  
  <p>I tried to remove the metadata-section in the connectionString, but then its saying that the keyword “provider” is not supported, and then “provider connection string” not supported.</p>
  
  <p>I also have these 2 sections in my web.config file:</p>
  
  <pre><code>&lt;entityFramework&gt;
      &lt;providers&gt;
          &lt;provider invariantName="MySql.Data.MySqlClient" 
              type="MySql.Data.MySqlClient.MySqlProviderServices, 
              MySql.Data.Entity.EF6, Version=6.8.3.0, 
              Culture=neutral, PublicKeyToken=c5687fc88969c44d" /&gt;
      &lt;/providers&gt;
  &lt;/entityFramework&gt;
  &lt;system.data&gt;
  &lt;DbProviderFactories&gt;
      &lt;clear /&gt;
      &lt;remove invariant="MySql.Data.MySqlClient" /&gt;
      &lt;add name="MySql.Data.MySqlClient" 
          invariant="MySql.Data.MySqlClient" 
          description=".Net Framework Data Provider for MySQL" 
          type="MySql.Data.MySqlClient.MySqlClientFactory, 
          MySql.Data, Version=6.8.3.0, Culture=neutral, 
          PublicKeyToken=c5687fc88969c44d" /&gt;
  &lt;/DbProviderFactories&gt;
  &lt;/system.data&gt;
  </code></pre>
  
  <p>I have references to MySQL Net-connector 6.8.3 files (MySql.Data, MySql.Data.Entity.EF6, MySql.Web).</p>
  
  <p>My requirments are that I must use <strong>MySQL</strong> and <strong>Entity Framework 6</strong>, and the changelog for the .NET connectior says that 6.8.x added support for MySQL.</p>
  
  <p>I’m out of ideas, hopefully someone can help me with this. Thanks in advance.</p>