dbfirst Entity生成命令行:

Scaffold-DbContext "PORT=5435;DATABASE=DocumentDB;HOST=localhost;PASSWORD=1;USER ID=postgres;" Npgsql.EntityFrameworkCore.PostgreSQL -OutputDir Entities -Tables "fsrd_plugingroup","fsrd_plugingroupfunction" -Context ApplicationContext -Contextdir Data  -Project BusinessOrg.API -StartupProject  BusinessOrg.API  -Force

 

 

参数说明

 

-o 输出目录(-OutputDir)

 

-f 覆盖现有文件(-Force),数据库更新时会用到

 

-t 指定表名(-Tables)

 

如果中间出错,请先确保你的工程文件可以编译成功,并使用-f参数覆盖现有文件

 

相关文章:

  • 2022-12-23
  • 2021-07-25
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-01
猜你喜欢
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
  • 2021-09-03
  • 2021-11-16
  • 2018-06-11
相关资源
相似解决方案