EntityFrameworkRuler.Editor 1.0.29-alpha.0.48

Prefix Reserved
This is a prerelease version of EntityFrameworkRuler.Editor.
There is a newer version of this package available.
See the version list below for details.
dotnet add package EntityFrameworkRuler.Editor --version 1.0.29-alpha.0.48                
NuGet\Install-Package EntityFrameworkRuler.Editor -Version 1.0.29-alpha.0.48                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EntityFrameworkRuler.Editor" Version="1.0.29-alpha.0.48" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EntityFrameworkRuler.Editor --version 1.0.29-alpha.0.48                
#r "nuget: EntityFrameworkRuler.Editor, 1.0.29-alpha.0.48"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install EntityFrameworkRuler.Editor as a Cake Addin
#addin nuget:?package=EntityFrameworkRuler.Editor&version=1.0.29-alpha.0.48&prerelease

// Install EntityFrameworkRuler.Editor as a Cake Tool
#tool nuget:?package=EntityFrameworkRuler.Editor&version=1.0.29-alpha.0.48&prerelease                

Entity Framework Ruler - Editor

Now available as a Visual Studio Extension.

Automate the customization of the EF Core Reverse Engineered model. Supported changes include:

  • Class renaming
  • Property renaming (including both primitives and navigations)
  • Type changing (useful for enum mapping)
  • Skipping non-mapped columns.
  • Forcing inclusion of simple many-to-many entities into the model.

EF Ruler applies customizations from a rule document stored in the project folder. Rules can be fully generated from an EDMX (from old Entity Framework) such that the scaffolding output will align with the old EF6 EDMX-based model.

"EF Ruler provides a smooth upgrade path from EF6 to EF Core by ensuring that the Reverse Engineered model maps perfectly from the old EDMX structure."


Upgrading from EF6 with EDMX:

  1. Install the Visual Studio Extension, right click on an EDMX and go to Convert EDMX to DB Context Rules. EDMX Converter
  2. Reference EntityFrameworkRuler.Design from the EF Core project.
  3. Run the ef dbcontext scaffold command and the design-time service will do the rest.

Initializing DB Context Rules Without an EDMX:

  1. Reference EntityFrameworkRuler.Design from the EF Core project.
  2. Run the ef dbcontext scaffold command and the design-time service will do the rest. By default, if no rule file found, a complete model is generated based on the current EF Core model. The rules can then be modified, and applied by re-running the scaffold command.

DB Context Customization and Ongoing DB Maintenance

  1. With VS Extension installed, right click on the json rules file and go to Edit DB Context Rules.
  2. Adjust the model as necessary using the editor UI.

Rule Editor


Applying Model Customizations:

  1. Reference NuGet package EntityFrameworkRuler.Design from the EF Core project. This is a Design-Time reference, meaning EF Core can use it during the scaffolding process but the assembly will NOT appear in the project build output.
  2. Run the ef dbcontext scaffold command and the design-time service will apply all changes as per the json rule file.

Adding/Removing Tables From the Model:

By default, a rule file generated from EDMX limits tables and columns to just what was in the EDMX. That way, an identical model can be generated.

If it's time to add a table or column to the model, adjust the IncludeUnknownTables/IncludeUnknownColumns flags at the relevant level.

If the database schema contains a lot of tables that you don't want to generate entities for, then enabling IncludeUnknownTables is not a good idea. Instead, manually create the table entry in the rule file (using the Editor UI) and set IncludeUnknownColumns to true. On the next scaffold, the entity and table rules will be generated fully.

You can remove entities from the model by marking the corresponding table (or column) as Not Mapped.


Entity Configuration Splitting:

The ef dbcontext scaffold command does not natively support splitting entity type configurations into separate files. Instead, all type configurations are stored in the same file as the context.

With EF7, EntityFrameworkRuler.Design can split configurations for you.

Just enable "SplitEntityTypeConfigurations" in the rule file (at the root level).


This project is under development! Check back often, and leave comments here.

Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed. 
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
9.0.1 77 11/21/2024
9.0.1-alpha.0.2 38 11/21/2024
1.3.48 97 9/28/2024
1.3.46 127 8/27/2024
1.3.46-alpha.0.1 52 8/27/2024
1.3.45 87 5/2/2024
1.3.44 68 5/2/2024
1.3.43 64 5/2/2024
1.3.42 76 5/2/2024
1.3.40 125 4/4/2024
1.3.9-alpha.0.1 70 4/4/2024
1.3.8 127 3/21/2024
1.3.7 115 3/21/2024
1.3.6 206 12/19/2023
1.3.5 162 11/29/2023
1.3.4 143 11/18/2023
1.2.40 163 10/26/2023
1.2.39 150 10/25/2023
1.2.38 195 10/24/2023
1.2.37 130 10/23/2023
1.2.36 223 7/17/2023
1.2.34-alpha.0.2 87 7/14/2023
1.2.33 181 7/12/2023
1.2.30 205 6/22/2023
1.2.30-alpha.0.1 75 6/21/2023
1.2.29-alpha.0.1 73 6/20/2023
1.2.28 182 6/20/2023
1.2.27 228 4/18/2023
1.2.26 269 3/23/2023
1.2.25 265 3/16/2023
1.2.22 260 3/7/2023
1.2.21 287 3/6/2023
1.2.21-alpha.0.4 87 3/6/2023
1.2.19 291 2/14/2023
1.2.19-alpha.0.4 95 2/14/2023
1.2.17 334 1/31/2023
1.2.16 331 1/27/2023
1.2.15 326 1/27/2023
1.2.14 343 1/26/2023
1.2.13 314 1/25/2023
1.2.10 344 1/25/2023
1.2.9 334 1/25/2023
1.2.8 304 1/25/2023
1.2.7 329 1/24/2023
1.2.6 327 1/24/2023
1.2.5 331 1/24/2023
1.2.4 360 1/18/2023
1.2.3 346 1/17/2023
1.2.3-alpha.0.1 112 1/9/2023
1.2.2 332 1/9/2023
1.2.1-alpha.0.2 113 1/6/2023
1.2.0 338 1/5/2023
1.1.8-alpha.0.16.4 114 1/5/2023
1.1.8-alpha.0.16.2 124 1/5/2023
1.1.8-alpha.0.16.1 127 1/5/2023
1.1.8-alpha.0.16 112 1/5/2023
1.1.8-alpha.0.15 118 1/4/2023
1.1.7 354 12/14/2022
1.1.6-alpha.0.5 102 12/14/2022
1.1.6-alpha.0.4 104 12/13/2022
1.1.6-alpha.0.2 113 12/13/2022
1.1.6-alpha.0.1 102 12/13/2022
1.1.5 327 12/9/2022
1.1.3 363 12/8/2022
1.1.3-alpha.0.2 94 12/8/2022
1.1.3-alpha.0.1 96 12/8/2022
1.1.2 319 12/8/2022
1.1.1 327 12/7/2022
1.1.0 351 12/6/2022
1.0.29-alpha.0.50 105 12/6/2022
1.0.29-alpha.0.48 99 12/6/2022
1.0.29-alpha.0.22 100 11/30/2022
1.0.28 382 11/18/2022
1.0.27 358 11/18/2022
1.0.26 376 11/18/2022
1.0.25 388 11/18/2022
1.0.22 379 11/17/2022
1.0.21 396 11/17/2022
1.0.20 385 11/16/2022
1.0.20-alpha.0.2 101 11/16/2022
1.0.20-alpha.0.1 99 11/16/2022
1.0.19 370 11/16/2022
1.0.18 377 11/16/2022
1.0.17-alpha.0.2 100 11/16/2022
1.0.17-alpha.0.1 102 11/15/2022
1.0.16 405 11/15/2022
1.0.16-alpha.0.2 105 11/15/2022
1.0.14-alpha.0.17 106 11/15/2022
1.0.14-alpha.0.9 103 11/15/2022