EntityFramework Core DB Migrations
EntityFramework Core DB Migrations
說明
dotnet ef migrations add <Migration Name> --startup-project 03.Presentation/WayDoSoft.MoldPlan.DbMigration --project 01.Core/WayDoSoft.MoldPlan.Domain
執行指令範例
dotnet run -- -a CIDesignTimeDbContextFactory 介紹
使用場景
如何實現和使用 IDesignTimeDbContextFactory
IDesignTimeDbContextFactory1. 創建一個 DbContext 的工廠類
DbContext 的工廠類2. 使用 dotnet ef 工具時的行為
dotnet ef 工具時的行為3. 使用參數化連接字串或配置檔
注意事項
Last updated