Use EntityFramework6 to connect to the MySql database (db first mode)

Source: Internet
Author: User

Preparation tools:

VS2013, MySQL For VisualStudio 1.1.4, Connector/Net 6.8.3 (in Baidu Network Disk)

Run the following command in the package manager:

Install -- Package MySql. Data. Entity. EF6

If you directly add the ado.net object model, the following error occurs:


Note: There is a problem with the Provider generated in App. config. In this case, you need to manually add a red line:

<Provider invariantName = type =/>

In this case, you 'd better compile it first.

Then, add the ADO. NET object model.

Then it is the same as before.

I have been suffering from this problem for a long time and have forgotten it. Hope to help you get the same as me!

 

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.