MySQL Forums
Forum List  »  MySQL for Visual Studio

Re: How to start using Entity Framework 6 with MySQL databases
Posted by: Edgar Knapp
Date: January 17, 2014 02:46PM

I finally got it to work! The MySQL installer refused to work (first it complained about Commercial components being installed alongside GA ones; I never installed a commercial MySQL component in my life), then after I had removed Connector, Workbench, VS Integration, Notifier, Tools, and what else I could find, it would not update itself ("Update download failed security check" wtf?).

I installed without updating the installer, copied the dll and jumped through a few other hoops (installing EF6 and MySQL for EF6 via Nuget, modifying web.config, building and ignoring the errors). Finally, I was able to generate the DDL for my one-entity data model and run the script in Workbench to create the table. Wow!

So it does work, sort-of, but I would not dare use it for anything but toy projects at this point.

Here is my web.config for reference:

<?xml version="1.0" encoding="utf-8"?>
For more information on how to configure your ASP.NET application, please visit
<!-- For more information on Entity Framework configuration, visit -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" />
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="" newVersion="" />
<add name="Model1Container" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=svctest;user id=root;password=???????;persistsecurityinfo=True;database=test&quot;" providerName="System.Data.EntityClient" />

Options: ReplyQuote

Written By
Re: How to start using Entity Framework 6 with MySQL databases
January 17, 2014 02:46PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.