March 28, 2017

Npgsql - dotnet core package a day - 9


This post is part of a series, dotnet core package a day, where for 15 days I will be posting an overview of an awesome OSS dotnet package that already has support for dotnet core. In this post we will cover Npgsql.

Npgsql is an open source ADO.NET Data Provider for PostgreSQL, it allows programs written in C#, Visual Basic, F# to access the PostgreSQL database server. It is implemented in 100% C# code, is free and is open source.

In addition, providers have been written for Entity Framework Core and for Entity Framework 6.x.

Npgsql is by far the most popular dotnet data provider for PostgreSQL. At the time of writing it has 987,642 downloads on NuGet. The publish of it's v3.1.0 release to NuGet on the 16th May 2016 added support for dotnet core (.net standard 1.3), that is pretty impressive.

Npgsql development is led by Shay Rojansky, it is under active development and there have been contributions from ~60 individuals.

I've only recently started to use PostgreSQL so Npgsql is still quite new to me. I'm enjoying using it so far. For anyone who is already familiar with dotnet database drivers it is easy to use and will look very familiar.

Npgsql aims to be fully ADO.NET-compatible, its API should feel almost identical to other .NET database drivers. Here's a basic code snippet to get you started.

What the community thinks

tweet tweet tweet


Massive thanks to Shay and the community.

If you don't want to keep checking back for more posts in this series but do want an email in your inbox then you can subscribe to the mailing list below.

Tags: dotnet core Npgsql PostgreSQL