Skip to content

About

Entity Framework Core Power Tools - reverse engineering, migrations and model visualization in Visual Studio & CLI

Topics

Resources

Stars

2.5k stars

Watchers

56 watching

Forks

Repository files navigation

EF Core Power Tools

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.

CLI build CLI version including nightly builds Visual Studio Marketplace Rating Visual Studio Marketplace Installs Follow ErikEJ on X

Get started

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.

Repeatable reverse engineering for teams and CI

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:

  • Pin the CLI to an exact version and commit the generation script, efcpt-config.json, and any custom renaming files or T4 templates.
  • Use the same source database schema or .dacpac input for each run.
  • Set explicit line endings and character set so generated files use the same formatting on Windows, Linux and macOS.

Documentation

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

Daily builds

Videos and presentations

Related projects and packages

Contributing

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.

Building and debugging

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.

Support and sponsors

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.

AWS

And a huge thanks to everyone who sponsors this project through GitHub Sponsors.

About

Entity Framework Core Power Tools - reverse engineering, migrations and model visualization in Visual Studio & CLI

Topics

Resources

Stars

2.5k stars

Watchers

56 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages