- Package引入:
mysql.data
MySql.Data.EntityFrameworkCore
Pomelo.EntityFrameworkCore.MySql
2. 在package manager console中输入一下字段,记住在default project里选择你要生成的到的项目名称就可以了
Scaffold-DbContext "server=127.0.0.1;port=3306;user=godam;password=12qw!@QW;database=godam" Pomelo.EntityFrameworkCore.MySql -OutputDir Models -f