dotnet tool install --global
dotnet tool install -g dotnet-ef --version 3.1.19 --初始化指定版本
dotnet-ef dotnet add package Microsoft.EntityFrameworkCore.Design --依賴包
dotnet ef migrations add InitialCreate --生成配置文件 如果報錯可手動刪除對應文件也可通過命令刪除後再執行命令
dotnet ef migrations script -o d:\script\dm.sql --最終保存爲sql文件 文件路徑自定義