This post was last edited by QWERTYU on 2019-7-5 10:37
1. Installation (preparation): VS2017 Mysql Service + Navicat (Mysql Client)
mysql-for-visualstudio-1.2.7.msi (Download according to your own needs:The hyperlink login is visible.) mysql-connector-net-6.10.8 (download and install it yourself according to the version used in your project:The hyperlink login is visible.)
2. Use (official use):
Using the EF Designer:
If you find that MySQL is not available at the moment, you have not installed it yetmysql-for-visualstudio and mysql-connector-net, please install them first as described in the first step
After installation, continue to operate Install Mysql.Data.Entity using Nuget (it must be the same version of mysql-connector-net that you installed in the first step, otherwise there may be a crash in subsequent operations)
Then you can press itStep to generate the corresponding entity in MYSQL.
At this point, there is no suspense anymore.
At this point, the whole thing is done.
Frequently asked questions:
Question 1.
The connection string is not available, add a new connection, test the connection is successful, but after sure, it will give the prompt "The given keyword is not in the dictionary" as shown in the image below
Solution: 1. Make sure that the MySQL version used in VS (NuGet can get the corresponding version) is the same as the Mysql Connector version installed on the current computer. 2. Close VS (be sure to close all VS windows), find the file DefaultView.SEView in the system disk and delete it. The usual path is: Users\AppData\Microsoft\VisualStudio\xx\ServerExplorer
Question 2. There is a crashOr the problem as shown in the figure below is due to the inconsistency between the MySql.Data.Entity.EF6 version referenced in the project and the installed mysql-connector-net version
Solution: The version of MySql.Data.Entity.EF6 referenced in the project is inconsistent with the version of mysql-connector-net installed. Just change it to consistent
Others:
If you want to delete an existing connection string,
Close VS (be sure to close all VS windows),
Find the file DefaultView.SEView in the system disk and delete it.
The usual path is: Users\AppData\Microsoft\VisualStudio\xx\ServerExplorer
|