CodeFirst命令


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命令來查看詳細更新情況


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM