Efrpg 1.1.0

dotnet tool install --global Efrpg --version 1.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Efrpg --version 1.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Efrpg&version=1.1.0
                    
nuke :add-package Efrpg --version 1.1.0
                    

EFRPG Dotnet Tool - Project Briefing

What This Is

This is a .NET global tool (efrpg) that is part of v4 of the EntityFramework Reverse POCO Code First Generator (EFRPG) project.

The tool's sole job is to connect to a database, reverse-engineer the schema, and write the raw schema data as XML to stdout. A T4 template in a separate public repo reads that XML and generates EF Code First POCO classes, DbContext, mappings, stored procedure callers, etc.

This repo is private. The public repo (T4 template side) is at: https://github.com/ReversePOCO/EntityFramework-Reverse-POCO-Code-First-Generator

Why a Separate Tool

The old architecture embedded the database readers inside the T4 template as a .ttinclude file. This caused a problem:

NuGet packages were unavailable. T4 runs inside the Visual Studio host process (.NET Framework 4.8), so database drivers for Oracle, MySQL, PostgreSQL etc. had to be in the GAC. Users had to install them manually. As a .NET tool, this project can declare standard NuGet dependencies and they restore automatically.

Architecture

T4 template (public repo)
    |
    | runs as child process
    v
efrpg --database SqlServer --connection "..." [--timeout 600]
    |
    | writes XML to stdout
    v
T4 template parses XML (using System.Xml.Linq / XDocument)
    |
    | generates C# files
    v
User's project

Why XML (not JSON)

T4 templates run in the .NET Framework 4.8 VS host. System.Xml and System.Xml.Linq are always available there without any assembly references. JSON libraries are not. XML encoding handles all special characters in table/ column names (commas, quotes, angle brackets, Unicode) automatically.

CLI Interface

efrpg --database <type> --connection <string> [--timeout <seconds>]
Flag Short Required Default Description
--database -d yes - SqlServer, PostgreSQL, MySql, SQLite, Oracle
--connection -c yes - ADO.NET connection string
--timeout -t no 600 SQL command timeout in seconds

Exit code 0 = success (XML on stdout). Non-zero = error (message on stderr).

Database Drivers (NuGet)

Each database type uses its own ADO.NET driver. These are standard NuGet package references - no GAC required.

DatabaseType NuGet Package
SqlServer Microsoft.Data.SqlClient
PostgreSQL Npgsql
MySql MySqlConnector
SQLite Microsoft.Data.Sqlite
Oracle Oracle.ManagedDataAccess.Core

Owner

ReversePOCO - simon@reversepoco.co.uk

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.1.0 59 9/25/2026