title: Using Visual Studio 2013 with Entity Framework 6 how to use code first with a mySql database
body: <p>I've been working on a WPF application.  I'm trying to include a MySql database.  Outside of using MySql for Visual Studio I've not seen a good tutorial for using Entity Framework 6 with MySql database's.  Anyone have a good tutorial for WPF that I can use or what I need next.  Most of what I have seen doesn't have code first.</p>
  
  <p>So far what I have is a connection to a empty mysql db in the Server Explorer.  Secondly I've got my packages.config file : </p>
  
  <pre><code>&lt;packages&gt;
    &lt;package id="CommonServiceLocator" version="1.2" targetFramework="net45" /&gt;
    &lt;package id="EntityFramework" version="6.1.1" targetFramework="net45" /&gt;
    &lt;package id="ModernUI.WPF" version="1.0.5" targetFramework="net45" /&gt;
    &lt;package id="MvvmLight" version="4.2.30.0" targetFramework="net45" /&gt;
    &lt;package id="MvvmLightLibs" version="4.3.31.1" targetFramework="net45" /&gt;
    &lt;package id="MySql.Data" version="6.9.2-rc1" targetFramework="net45" /&gt;
    &lt;package id="MySql.Data.Entity" version="6.9.2-rc1" targetFramework="net45" /&gt;
  &lt;/packages&gt;
  </code></pre>
  
  <p>Then I've got my App.config file... Haven't done anything with this as I am not sure what to do :</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=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
    &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;&lt;/configSections&gt;
    &lt;startup&gt;
      &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /&gt;
    &lt;/startup&gt;
    &lt;entityFramework&gt;
      &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"&gt;
        &lt;parameters&gt;
          &lt;parameter value="mssqllocaldb" /&gt;
        &lt;/parameters&gt;
      &lt;/defaultConnectionFactory&gt;
      &lt;providers&gt;
        &lt;provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /&gt;
      &lt;/providers&gt;
    &lt;/entityFramework&gt;
    &lt;runtime&gt;
      &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="Microsoft.Practices.ServiceLocation" p ublicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-1.2.0.0" newVersion="1.2.0.0" /&gt;
        &lt;/dependentAssembly&gt;
      &lt;/assemblyBinding&gt;
    &lt;/runtime&gt;
  &lt;connectionStrings&gt;&lt;add name="Model1" connectionString="data source=(LocalDb)\v11.0;initial catalog=_12_RSE_002.Model1;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" /&gt;&lt;/connectionStrings&gt;&lt;/configuration&gt;  
  </code></pre>