How to use entityframework6.x to connect to MySQL in VS2013 or earlier versions

Source: Internet
Author: User
Tags mysql for visual studio

In this there is not much to say entityframework compared to the various advantages and disadvantages of ADO. Please forgive me for not writing well.

Recently used entityframework6.0 connection MySQL, encountered a variety of problems, Baidu Google on many posts but can not solve the situation. So send a post to provide a complete and workable solution.

One, Mysqldatabase appears in the Entity Data Model Creation Wizard:

1: Install MySQL for Visual Studio 1.1.1 (with the above version)

2: Install MySQL Connector Net 6.8.3 (with the above version)

3: Install the NuGet Package Manager and download it in the expand function of vs.

PS: When installing MySQL, some users will automatically install the latest version of the above two software if they choose a full installation.

After restarting vs:

At this point, the Entity Framework 6.x still cannot check the next step.

II: Project Environment configuration

1: In the menu bar tool->nuget Package Manager, in the Package Manager console, enter the following commands sequentially:

Install-package entityframework-version 6.0.0

Install-package entityframework.zh-hans-version 6.0.0

Install-package MySql.Data.Entities.EF6

The files required for the first execution of the download are slow.

After execution, add the <entityFramework> <providers> under Config file.

<provider invariantname= "MySql.Data.MySqlClient" type= "MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6 "/>

To this end, you can happily use ef6.x, hey, next post see, (reprint please indicate the source).

How to use entityframework6.x to connect to MySQL in VS2013 or earlier versions

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.