Entity Framework Core Power Tools - 反向工程、遷移與模型可視化,於 Visual Studio 與 CLI 中
AI 翻譯
Entity Framework Core Power Tools - reverse engineering, migrations and model visualization in Visual Studio & CLI
外掛C# · BatchfileGitHub @ErikEJ自行安裝營運者未確認
試用過了嗎? 點一下就好,不需要登入。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
安裝型專案無需部署網域也可驗證。個人儲存庫可透過 GitHub 登入驗證,組織儲存庫可使用上方的儲存庫驗證檔案。
製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗EF Core Power Tools helps you generate EF Core entity classes and a DbContext from an existing database or SQL Server .dacpac file. It also provides tools to visualize and inspect your DbContext model in Visual Studio.
Start with the CLI (efcpt) for reverse engineering across a team or in CI. It runs on Windows, Linux and macOS, so developers, coding agents, and build agents can use the same scripted workflow regardless of their editor or operating system.
| Tool | Use it for | Get started |
|---|---|---|
Command-line tool (efcpt) | Scripted reverse engineering for local development, shared team workflows and CI on Windows, Linux and macOS. | Follow the CLI installation and usage guide. |
| Visual Studio extension | Model visualization and inspection in Visual Studio 2022, plus a reverse engineering wizard for those who prefer a graphical workflow. | Install from Visual Studio Marketplace. For the reverse engineering wizard, follow the Quick Start, which includes a 10 minute video. |
You can use both tools together: generate and regenerate your code with the CLI, then use the Visual Studio extension to visualize and inspect the resulting DbContext model.
For the CLI, see its guide for runtime requirements and choosing a tool version that matches your EF Core version.
For reverse engineering with the Visual Studio extension, the .NET 8.0 or .NET 10.0 runtime must be installed. You can also install the extension through the Extensions > Manage Extensions dialog in Visual Studio.
The CLI lets you keep generation choices in source control and run the same command locally and in CI. This makes changes to object selection, naming and code generation settings reviewable alongside your application code. For consistent output across developers and build agents:
efcpt-config.json, and any custom renaming files or T4 templates.| Task | Guide |
|---|---|
Run and configure efcpt. | CLI guide |
| Choose database objects and customize generated code, names, templates and stored procedures. | Reverse Engineering guide |
| Visualize and inspect a DbContext model in Visual Studio. | Model graphing and scripting |
| Explore the Visual Studio extension's database and database project tools. | User guide and feature index |
| See what changed in a release. | Release notes |
AsDgml() to a derived DbContext to generate a model graph for the Visual Studio DGML viewer.dotnet ef).If you encounter a bug or have a feature request, please use the Issue Tracker. The project is also open for pull requests following standard pull request guidelines.
To build and debug the Visual Studio extension, run the latest version of Visual Studio as Administrator with the Visual Studio extension development workload installed. Make EFCorePowerTools the startup project, and ensure your build configuration is Debug, AnyCPU.
You can smoke test changes to reverse engineering. Launch one of the efreveng console apps in the debugger using the name of a file in the TestFiles folder as a parameter.
In the ScaffoldingTester solution there are scripts to populate Northwind and Chinook databases with the required objects.
The tool and GitHub based support are free. A rating or review and sponsorships are greatly appreciated.
A massive thanks to AWS, who sponsored EF Core Power Tools from January 2024 via the .NET on AWS Open Source Software Fund.
And a huge thanks to everyone who sponsors this project through GitHub Sponsors.