Entity framework with mysql
Posted by: Przem Pod
Date: July 16, 2013 10:14AM

Hello,
im trying to use EF with MySQL(part of my final paper). So I download mysql-installer-web-community-5.7.1.3-m11.msi (its dev version because official gace mi constant exception when i was trying to choos what to install) and with it i installed tool for visual studio 2012. With this i generated new Data model(edmx, context etc.) from my MySql db - so far so good.
Then i installed via NuGet MySql.Data and MySql.Data.Entities(version 6.7.4 and 6.7.4.1) and created conn string and DbProviderFactories :
<connectionStrings>
<add name="classicmodelsEntities" connectionString="metadata=res://*/mysql.Model1.csdl|res://*/mysql.Model1.ssdl|res://*/mysql.Model1.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=localhost;user id=root;password=Password;persist security info=True;database=classicmodels&quot;" providerName="MySql.Data.MySqlClient" />
</connectionStrings>

<DbProviderFactories>
<!--<remove invariant="MySql.Data.MySqlClient" />-->
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data" />
</DbProviderFactories>

but when i create context i got error:
Unable to find the requested .Net Framework Data Provider. It may not be installed
when i change my connstring so it will use providerName="System.Data.EntityClient"
The specified store provider cannot be found in the configuration, or is not valid

uncommenting remove invariant doesnt help. i tried also downloading connectormysql-connector-net-6.7.4.msi and install it but it doesnt help either.

Any ideas?

Options: ReplyQuote




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.