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.