EF6 and MySQL create database from model

I tried every solution I found on the Internet, without success. I keep getting an error message:

Running transformation: System.InvalidOperationException: The SSDL generated by the activity
called 'CsdlToSsdlAndMslActivity' is not valid and has the following errors: 
  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. See http://go.microsoft.com/fwlink/?LinkId=260882 for 
more information.

I have an empty console project and a very simple model to verify this. Through the NuGet package console, I did: Install-Package MySQL.Data.Entitieswhich installed EF6, MySQL.Dataand MySQL.Data.Entities, and connected all the links and copied the corresponding DLL to the folder bin/Debug.

I connected the provider in the following list (entire configuration file)

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
  </startup>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
    <providers>
      <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"></provider>
    </providers>
  </entityFramework>
</configuration>

As far as I can tell, I have a registered provider. I also updated the latest MySQL connector. Where am I mistaken?

+3
source share
2 answers

To support full functionality, EF Designer requires 3 things:

  • EF (, )
  • DDEX - DDEX - , VS , , . , - EF, EF Designer (- , , , MySQL).
  • ( T4/ ), First Model - EF, DDEX - , , , T4/workflow, ( edmx , , DDL - " " " DDL". , , - MySQL)

, , /T 4 MySQL (, , , T4/ (. ), MySQL DDEX - ). EF Designer , Sql Server. EF ( SqlServer SqlServerCe) , MySQL - , . , T4 DDL , , MySQL , - SQL Server SQL Script MySQL.

, , DDL , , , . .

, MySQL, First. Code First, EF, DDL.

+7

, .

, SSDLToSQL10.tt. , .tt , , MySQL . EF DDL Generation Template SSDLToSQL10.tt SSDLToMySQL.tt.

+1

All Articles