ASP.-EF connect to MYSQL in Mvc5+ef6+easyui admin system

Source: Internet
Author: User
Tags mssql mysql in management studio sql server management sql server management studio

Objective

Although the system currently only supports MSSQL version, but many friends of the company technical rules must use MySQL, let's use EF to connect MySQL!

(1) Install the MySQL environment 1. Download and install MySQL data, here we install phpstudy integrated environment, so integrated MySQL database, directly start running

2. Installing the NAVICAT Premium 12 database management tool

Navicat Premium 12 is the same as MSSQL's SQL Server Management Studio, the process is similar, we can build a table, build a database

3. Install vs support for MySQL Toolkit
    • mysql-connector-net-6.9.12
    • mysql-for-visualstudio-1.2.8

 Link: Https://pan.baidu.com/s/1Quzqv_zdaYwexNIz0RmcpQ Password: AIJJ

(2) Create a. NET class library in VS 1. Open vs and New class library

2. Install the supported MySQL NuGet packages

Note: The mysql-connector-net-6.9.12 version needs to be the same as the MySql.Data.Entity in the NuGet package, otherwise adding EF entities will flash

3. Add the ADO Entity Data Model

Right-click---new from Project

4. EF Designer from the database

5. New link to link MySQL database

6. Successful operation, there will be a table procedure for you to map the database

Summarize

Special Note: The mysql-connector-net-6.9.12 version needs to be the same as the MySql.Data.Entity in the NuGet package, otherwise the EF entity will flash back

ASP.-EF connect to MYSQL in Mvc5+ef6+easyui admin system

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.