Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1451

Entity framework with mysql (12 replies)

$
0
0
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?

Viewing all articles
Browse latest Browse all 1451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>