CodeFirst命令

不想你离开。 提交于 2020-02-09 09:09:13

CodeFirst

  • get-help entityFramework          NuGet命令
  • Add-Migration                       Adds a new migration. 新创建Model或者Model 进行改变,会生成一些sql语句(只是生成,没有执行)
  • Drop-Database                          Drops the database.
  • Get-DbContext                          Gets information about a DbContext type.
  • Remove-Migration                     Removes the last migration.
  • Scaffold-DbContext                   Scaffolds a DbContext and entity types for a database.
  • Script-Migration                         Generates a SQL script from migrations.
  • Update-Database                      Updates the database to a specified migration.  在更能数据库时,可以使用 Update-Database -verbose命令来查看详细更新情况
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!