Recently tossing MySQL database on vs
There are some minor problems, here's a record
Problem one: There is no MySQL database option in the data source selection
Liberation Method:
1. Install MySQL vs plugin (version please download the latest version)
Mysql-for-visualstudio-1.2.3.msi
2. Install for. NET Connectors
Mysql-connector-net-6.9.4.msi
3. Install EF using NuGet Packages (NuGet Package Manager)
Using the command install-package entityframework
There's a lot of controversy about this place.
I'm not successful anyway, EF's going to go
Here my workaround is to add the reference directly to find MySQL and then it succeeds.
4. Option to install MYSQL EF6 support
Install-package MySql.Data.Entity.EF6
This thing has been installed after the connector.
5. Modify App. Config
<entityFramework>
<defaultconnectionfactory type= "MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6"/>
<providers>
<provider invariantname= "MySql.Data.MySqlClient" type= "MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6 "></provider>
<provider invariantname= "System.Data.SqlClient" type= "System.Data.Entity.SqlServer.SqlProviderServices, Entityframework.sqlserver "/>
</providers>
</entityFramework>
Question two:
Questions to note when adding EF entity models
Solution:
<provider invariantname="MySql.Data.MySqlClient " type= " MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" />
In Web. config
After insertion, it's best for Mr.
MySQL related issues in VS