大润晟泽博客

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 812|回复: 0

EFcore mysql dbfirst 命令

[复制链接]

16万

主题

16万

帖子

49万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
493076
发表于 2021-10-15 10:30:33 | 显示全部楼层 |阅读模式
  1. Scaffold-DbContext -Force  "Server=****;User Id=root;Password=****;Database=****" -Provider "Pomelo.EntityFrameworkCore.MySql"
复制代码
在程序包控制台输入以上命令:
  1. Scaffold-DbContext -Force  "Server=****;User Id=root;Password=****;Database=****" -Provider "Pomelo.EntityFrameworkCore.MySql"  -Tables "myTable"
复制代码
如果是针对单表的更新,加一个-Tables 后面是要更新的表名




上一篇:.NET 6 隐式命名空间引用的功能默认禁止
下一篇:efcore报错误The instance of entity type ‘xxx‘ cannot be tracked
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|大润晟泽博客 ( 鲁ICP备17022854号-3 )

GMT+8, 2024-4-26 01:40 , Processed in 0.086149 second(s), 24 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表