PetaPoco.DBEntityGenerator 0.1.3

dotnet add package PetaPoco.DBEntityGenerator --version 0.1.3
                    
NuGet\Install-Package PetaPoco.DBEntityGenerator -Version 0.1.3
                    
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="PetaPoco.DBEntityGenerator" Version="0.1.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PetaPoco.DBEntityGenerator" Version="0.1.3" />
                    
Directory.Packages.props
<PackageReference Include="PetaPoco.DBEntityGenerator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PetaPoco.DBEntityGenerator --version 0.1.3
                    
#r "nuget: PetaPoco.DBEntityGenerator, 0.1.3"
                    
#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.
#:package PetaPoco.DBEntityGenerator@0.1.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PetaPoco.DBEntityGenerator&version=0.1.3
                    
Install as a Cake Addin
#tool nuget:?package=PetaPoco.DBEntityGenerator&version=0.1.3
                    
Install as a Cake Tool

PetaPoco.DBEntityGenerator

PetaPoco has stopped T4 template support since Version 6. But there are still lots of people loves generating DB entity classes from database. This is a tool that can help. It is ported from the PetaPoco T4 template.

How to use

It can be installed via nuget by installing the package PetaPoco.DBEntityGenerator.

It supports net45 and net6.0.

Choose any target framework that can run on your computer.

By using it on netcore 6.0, you can run dotnet ~/.nuget/packages/petapoco.dbentitygenerator/0.1.3/tools/net6.0/PetaPoco.DBEntityGenerator.dll.

By using it on net45 on windows, you can run ~\.nuget\packages\petapoco.dbentitygenerator\0.1.3\tools\net45\PetaPoco.DBEntityGenerator.exe.

Here are the parameters it supports:

--config                  Config file path

-p, --providerName        Database provider name, supported arguments are Npgsql, SqlServer, MySql and Oracle

-c, --connectionString    Connection string to the database

--namespace               (Default: Entities) Namespace of generated classes

--explicitColumns         (Default: true) Explicit columns

--trackModifiedColumns    (Default: true) Track modified columns

-o, --output              (Default: console) Output, valid options are console, file

--outputFile              (Default: Database.cs) Output file name

--help                    Display this help screen.

--version                 Display version information.

You can either provide a config file or just leave it empty and set all other parameters, but with table customizations feature absent.

You can do table customization(e.g. table ignore, entity name change, columns customization) with a config file. Sample config file can be found in source code sample_config.json.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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
0.1.3 5,675 12/3/2023
0.1.2 4,738 4/5/2023
0.1.1 15,691 3/30/2021
0.1.0 5,240 7/31/2019