Skip to content


.NET Core command-line (CLI) tool to generate Entity Framework Core source files.


The Entity Framework Core Generator tool is available on via package name EntityFrameworkCore.Generator.

To install EntityFrameworkCore.Generator, run the following command in the console

dotnet tool install --global EntityFrameworkCore.Generator

More information about NuGet package available at


  • Entity Framework Core database first model generation
  • Safe regeneration via region replacement
  • Safe Renaming via mapping file parsing
  • Optionally generate read, create and update models from entity
  • Optionally generate validation and object mapper classes


To generate source code files from your database, use the generate command with your connection string.

efg generate -c <ConnectionString>