Write in front
Because of the recent use of MySQL more, so want to understand the content of the next ef+mysql, found that EF connected MySQL database, there is a road toss. Toss to the end, crazy.
Steps
This is the way to use EF with DB first.
From the diagram above, you will find that VS does not add the MySQL data provider by default, in order to see the MySQL provider here, the following steps are required.
- Mysql-for-visualstudio-1.2.4.msi download the file, and then run the installation.
- Installing EF with NuGet
- Use the NuGet provider.
After completing the above steps, you can see the following Web. config file, and you will find that there are several more nodes in it.
The providers node adds the MySQL provider, as well as the MySQL provider factory.
Complete the above steps, and repeat the add entity above.
Look forward to, hope to see the results, it turned out to be so, try many times, or so, do not know the cause of VS or MySQL reason, is no language ah, re-installed vs or so, completely do not know what the reason.
What's the situation?????
Environment
WIN10+VS2015 Professional Edition +mysql
Have you encountered this problem? How to solve?
[Ef]vs5+ef6+mysql This question, have you ever met?