I have a strange problem with MySql Connector (6.8.3) and EF6. I was working on a WebApi project where I use MySql and EF6 with a basic Database approach. Everything worked fine [even deployed to one of the test servers] until I changed the database from the Test database to the Production database [only the database name] in the connection string and updated the model [just to see that nothing is broken! ]. After that, he was unable to connect to the database. So, I changed the connection string and rebuilt the solution, then I got a bunch of “Mapping” warnings. I deleted the model and tried again to create the model from the database. Now I get the following message
Your project references the latest version of the Entity Framework; however, a compatible database provider Entity Framework could not find a data connection for you. Exit this wizard, install a compatible provider, and rebuild the project before completing this step.
Here is the configuration file
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<system.data>
<DbProviderFactories>
<clear/>
<remove invariant="MySql.Data.MySqlClient"/>
<add name="MySql.Data.MySqlClient" description="ADO.Net driver for MySQL" invariant="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data,Version=6.8.3.0, Culture=neutral,PublicKeyToken=c5687fc88969c44d"/>
</DbProviderFactories>
</system.data>
<entityFramework codeConfigurationType="MySql.Data.Entity.MySqlEFConfiguration, MySql.Data.Entity.EF6">
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" />
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
I tried reinstalling the connector and EF from Nuget, but nothing changed. Can someone please let me know what is going on?
thanks
source
share