Skip to content
Simon Hughes edited this page Mar 20, 2026 · 43 revisions

EntityFramework Reverse POCO Code First Generator

The generator creates Entity Framework Code First classes by reverse-engineering existing databases. It produces code as if an expert reverse-engineered your database and wrote it for you.

Key Features

  • Generates POCO classes, configuration mappings, and enumerations
  • Creates DbContext and FakeDbContext for unit testing
  • Supports stored procedures and table-valued functions
  • Fully customizable output via callbacks and delegates
  • Available as a VSIX installer from the Visual Studio Marketplace
  • Supports multiple output file organization strategies (sub-folders, namespaces)

Give a Star! ⭐

If you like or are using this project, please give it a star. Thanks!

Watch a short video clip (no audio)

Watch the video

Supported Databases

Database Status
SQL Server Fully supported
SQL Server CE Fully supported
SQLite Fully supported
PostgreSQL Fully supported
MySQL Under development
Oracle Under development
Plugin Via custom DLL

Supported EF Versions

EF Version Template Type Generator Type
EF 6 TemplateType.Ef6 GeneratorType.Ef6
EF Core 8 TemplateType.EfCore8 GeneratorType.EfCore
EF Core 9 TemplateType.EfCore9 GeneratorType.EfCore
EF Core 10 TemplateType.EfCore10 GeneratorType.EfCore

Installation Requirements

  • Visual Studio 2022 or later
  • Relevant NuGet packages:
    • .NET Core: Microsoft.EntityFrameworkCore.SqlServer (or provider for your database)
    • EF 6: EntityFramework
  • A connection string pointing to your database
  • Database credentials with ddladmin, datareader, and datawriter privileges

Quick Start

  1. Install the VSIX extension from the Visual Studio Marketplace
  2. Right-click your project → Add New Item
  3. Search for "reverse poco" in online templates
  4. Name the file (e.g., Database.tt) and click Add
  5. Edit the connection string and settings
  6. Save the file — Database.cs (and related files) are generated automatically

Recommended Settings

.NET Core / EF Core 10 (latest)

Settings.DatabaseType     = DatabaseType.SqlServer;
Settings.TemplateType     = TemplateType.EfCore10;
Settings.GeneratorType    = GeneratorType.EfCore;
Settings.UseMappingTables = false;
Settings.FileManagerType  = FileManagerType.EfCore;

.NET Core / EF Core 9

Settings.DatabaseType     = DatabaseType.SqlServer;
Settings.TemplateType     = TemplateType.EfCore9;
Settings.GeneratorType    = GeneratorType.EfCore;
Settings.UseMappingTables = false;
Settings.FileManagerType  = FileManagerType.EfCore;

.NET Core / EF Core 8

Settings.DatabaseType     = DatabaseType.SqlServer;
Settings.TemplateType     = TemplateType.EfCore8;
Settings.GeneratorType    = GeneratorType.EfCore;
Settings.UseMappingTables = false;
Settings.FileManagerType  = FileManagerType.EfCore;

.NET Framework / EF 6

Settings.DatabaseType     = DatabaseType.SqlServer;
Settings.TemplateType     = TemplateType.Ef6;
Settings.GeneratorType    = GeneratorType.Ef6;
Settings.UseMappingTables = true;
Settings.FileManagerType  = FileManagerType.VisualStudio;

Licensing

  • Free for academic use (.edu or .ac email addresses)
  • Commercial license required for commercial use — purchase at reversepoco.co.uk
  • Generated code remains usable indefinitely even if the licence expires
  • With an expired licence, generation is limited to 10 tables/views and 10 stored procedures

Contributing

See How to Get Your Pull Request Accepted for contribution guidelines.

Contact: simon@reversepoco.co.uk

Clone this wiki locally