DanielCunha.Toolkit.PostgreSQL.SnakeCase 1.1.0

dotnet add package DanielCunha.Toolkit.PostgreSQL.SnakeCase --version 1.1.0
NuGet\Install-Package DanielCunha.Toolkit.PostgreSQL.SnakeCase -Version 1.1.0
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="DanielCunha.Toolkit.PostgreSQL.SnakeCase" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DanielCunha.Toolkit.PostgreSQL.SnakeCase --version 1.1.0
#r "nuget: DanielCunha.Toolkit.PostgreSQL.SnakeCase, 1.1.0"
#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 DanielCunha.Toolkit.PostgreSQL.SnakeCase as a Cake Addin
#addin nuget:?package=DanielCunha.Toolkit.PostgreSQL.SnakeCase&version=1.1.0

// Install DanielCunha.Toolkit.PostgreSQL.SnakeCase as a Cake Tool
#tool nuget:?package=DanielCunha.Toolkit.PostgreSQL.SnakeCase&version=1.1.0

PostgreSQL with Snake Case

This package basically contains a pre-configured DbContext which automatically converts all your properties and tables to snake case (lorem_ipsum_dolor), PostgreSQL default syntax.

Motivation

Have you ever created a table in PostgreSQL using Pascal Case? This is the default syntax used by Entity Framework Core, specially when you are generating your database using migrations.

It's horrible to work with, at least using pgAdmin 4, because it breaks the default syntax. Therefore, you have to reference every column and table using double quotes, otherwise PostgreSQL will not find the table/column.

The goal of this package is to automatically convert your classes (tables) and properties (columns) into snake case when talking to the database, without having to change the default syntax of .NET projects.

Installation

Install NuGet package DanielCunha.Toolkit.PostgreSQL or download repo and compile it manually so you can reference it from your target project.

Usage

Just inherit your implementation of the DbContext from SnakeCaseDbContext and it's done. Now, try to generate a migration and you'll see your properties being generated in snake_case_syntax.

Contribute

Fell free to clone this repository and modify the projects as you wish. I'll glad to add your changes to the next version of the package!

License

MIT License.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 is compatible.  netcoreapp3.1 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
1.1.0 665 11/28/2019
1.0.0 512 11/9/2019