back to home

sjh37 / EntityFramework-Reverse-POCO-Code-First-Generator

EntityFramework Reverse POCO Code First Generator - Beautifully generated code that is fully customisable. This generator creates code as if you reverse engineered a database and lovingly created the code by hand. It is free to academics, commercial use requires a paid licence. Obtain your licence from:

712 stars
224 forks
140 issues
C#MustacheTSQL

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing sjh37/EntityFramework-Reverse-POCO-Code-First-Generator in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/sjh37/EntityFramework-Reverse-POCO-Code-First-Generator)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

EntityFramework Reverse POCO Code First Generator This generator creates code like an expert reverse-engineered your database and created the code for you. Perfectly. Reverse engineers an existing database and generates Entity Framework Code First Poco classes, Configuration mappings, Enumerations, DbContext, FakeDbContext (for easy unit testing) and calling Stored procedures and table-valued functions. **Beautifully generated code first code that is fully customisable** • Downloadable VSIX installer from the visual studio gallery. • Watch the v2 in-depth course at pluralsight I cover everything the v2 generator can do, and show you step-by-step how to reverse engineer your database properly. Please note that this is not the Microsoft reverse generator. This generator creates code as if you reverse-engineered a database and lovingly created the code by hand. It also allows you to customise the generated code to your liking. Give a Star! :star: If you like or are using this project, please give it a star. Thanks! Watch a short video clip (no audio) To remove trial limitations, you will require a licence key. Free to academics (you need a .edu, .ac or .sch email address), not free for commercial use. Go to the ReversePOCO website for your licence key. Upgrading v2 to v3 Please read the Upgrading documentation What's new Click here to see what's new in this release. Supported databases • SQL Server • SQL Server Compact 3.5 and 4.0 • PostgreSQL • Coming soon: Oracle, MySQL Highly customisable output This generator is designed to be customisable from the very beginning and not fixed and rigid like other generators. Play with the settings in the file. That's what it's there for. If your database changes, re-save the file. That's it. Click here to see a full list of features. To install and use this project: • Use Nuget and install the relevant NuGet package for your database. • .Net Core: • EF 6: • is mandatory in v3, so you need to provide the connection string from your app.config/web.config/appsettings.json file. The generator uses this connection string to reverse-engineer your database. It no longer reads your connection strings from *.config files. For example: Settings.ConnectionString = "Data Source=(local);Initial Catalog=Northwind;Integrated Security=True;Encrypt=false;TrustServerCertificate=true"; • The string you use must have at least these privileges: , and . is required for reading the default constraints. • In Visual Studio, right click project and select "add - new item". • Select Online, and search for **reverse poco**. • Select **EntityFramework Reverse POCO Generator**. • Give the file a name, such as and click Add. • Edit the file and specify the full connection string in . The generater uses this to read your database schema and reverse engineer it. • Edit the file and specify the connection string in which matches the ConnectionString key as specified in your , or . • Save the file, which will now generate the file. Every time you save your file, the generator will reverse engineer your database. • There are many options you can use to customise the generated code. All of these settings are in the files. Connection strings is mandatory in version 3. The generator uses it to read your database schema. The connection string is optionally placed into the OnConfiguring function: This is not used by the generator but is placed into the generated DbContext constructor via a call to . UI A simple UI for the generator is available at GitHub, which helps you to create a regex to filter your tables. Editing TT (T4) Files To have full syntax highlighting and intellisense when editing TT files, I use the Resharper plugin ForTea. I can't imagine editing TT files without it. No need to edit the file directly as this file is generated from a C# project. This repository includes the BuildTT file that creates the from the C# project. Getting a pull request accepted Have a read of https://github.com/blog/1943-how-to-write-the-perfect-pull-request My requirements are simple: • Always keep the changes to a **minimum**, so I can see **exactly** what's changed regarding the pull request. I.e. No whitespace tidy-up, Etc. • No tabs, only spaces (4). • Edit the Generator C# project. Running this project will create the file. This repository includes the project that creates the from the C# project. • Don't be tempted to do a few different enhancements in one pull request. Have **one** pull request for **one** bug fix/enhancement. Regards, Simon Hughes • E: simon@reversepoco.co.uk • W: about.me/simon.hughes • B: simon-hughes.blogspot.co.uk