First, Introduction
EF Core for MYSQL official version MySql.Data.EntityFrameworkCore
The current version of the version v6.10 is currently available, for the previous preview reference: http://www.cnblogs.com/tianma3798/p/6940794.html
Core installation of 1.MYSQL
6.10. 5
2.MYSQL Build Tool Installation
Install-package mysql.data.entityframeworkcore.design-version 6.10.5
NuGet Package Address:
Https://www.nuget.org/packages?q=MySql.Data.EntityFrameworkCore&prerel=false
Official Use Tutorial:
Https://dev.mysql.com/doc/connector-net/en/connector-net-entityframework-core.html
Second, Ef Core for MYSQL if the database already exists using the instance
1. Install the dependency package for code generation
Note: For the time being, it is important to note the version used
. Net Core 2.0 Correspondence
MYSQL. Data. Entityframeworkcore. Design
Microsoft.EntityFrameworkCore.Tools.DotNet 2.0.1
Microsoft.EntityFrameworkCore.Tools Version 2.0.1
2. Generate code using the package Manager Console command
" Server=localhost;port=3306;user=root;password=mypass;database=sakila " Mysql.data.entityframeworkcore-outputdir sakila-f
3. For new and modified fields, modify the database directly and then manually modify the model layer
More:
. Netcore in Efcore for MySQL finishing
. The use and arrangement of Efcore in Netcore (II.)-association Table query
. The use and finishing of Efcore in Netcore
. Netcore in Efcore for MySQL finishing (ii)