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