9
dotnet core 从MySql数据库生成实体类 Entity Model
source link: https://tianchunfeng.blog.csdn.net/article/details/85786475
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
dotnet core 从MySql数据库生成实体类 Entity Model
网上有很多方法,有些过时了,有些复杂度高,实际上可以更简单的完成这个任务:
打开项目的 csproj 文件增加如下行:
dotnet ef dbcontext scaffold "server=localhost;port=3306;user=root;password=jcjc的密码;database=数据库名字" MySql.Data.EntityFrameworkCore -o jcjc_model -f
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK