[Ef]vs5+ef6+mysql This question, have you ever met?

Source: Internet
Author: User

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.

    1. Mysql-for-visualstudio-1.2.4.msi download the file, and then run the installation.
    2. Installing EF with NuGet
    3. 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?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.