Npgsql 6.0.0 Prefix Reserved

Install-Package Npgsql -Version 6.0.0
dotnet add package Npgsql --version 6.0.0
<PackageReference Include="Npgsql" Version="6.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Npgsql --version 6.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Npgsql, 6.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Npgsql as a Cake Addin
#addin nuget:?package=Npgsql&version=6.0.0

// Install Npgsql as a Cake Tool
#tool nuget:?package=Npgsql&version=6.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Npgsql is the open source .NET data provider for PostgreSQL. It allows you to connect and interact with PostgreSQL server using .NET.

Quickstart

Here's a basic code snippet to get you started:

var connString = "Host=myserver;Username=mylogin;Password=mypass;Database=mydatabase";

await using var conn = new NpgsqlConnection(connString);
await conn.OpenAsync();

// Insert some data
await using (var cmd = new NpgsqlCommand("INSERT INTO data (some_field) VALUES (@p)", conn))
{
    cmd.Parameters.AddWithValue("p", "Hello world");
    await cmd.ExecuteNonQueryAsync();
}

// Retrieve all rows
await using (var cmd = new NpgsqlCommand("SELECT some_field FROM data", conn))
await using (var reader = await cmd.ExecuteReaderAsync())
{
while (await reader.ReadAsync())
    Console.WriteLine(reader.GetString(0));
}

Key features

  • High-performance PostgreSQL driver. Regularly figures in the top contenders on the TechEmpower Web Framework Benchmarks.
  • Full support of most PostgreSQL types, including advanced ones such as arrays, enums, ranges, multiranges, composites, JSON, PostGIS and others.
  • Highly-efficient bulk import/export API.
  • Failover, load balancing and general multi-host support.
  • Great integration with Entity Framework Core via Npgsql.EntityFrameworkCore.PostgreSQL.

For the full documentation, please visit the Npgsql website.

Related packages

NuGet packages (924)

Showing the top 5 NuGet packages that depend on Npgsql:

Package Downloads
Npgsql.EntityFrameworkCore.PostgreSQL

PostgreSQL/Npgsql provider for Entity Framework Core.

Npgsql.EntityFrameworkCore.PostgreSQL.Design

PostgreSQL/Npgsql provider for Entity Framework Core.

AspNetCore.HealthChecks.NpgSql

HealthChecks.NpgSql is a health check for Postgress Sql.

Hangfire.PostgreSql

PostgreSql storage implementation for Hangfire (background job system for ASP.NET and aspnet core applications).

Npgsql.Json.NET

Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.

GitHub repositories (155)

Showing the top 5 popular GitHub repositories that depend on Npgsql:

Repository Stars
DapperLib/Dapper
Dapper - a simple object mapper for .Net
dotnet/orleans
Orleans is a cross-platform framework for building distributed applications with .NET
nopSolutions/nopCommerce
The most popular open-source eCommerce shopping cart solution based on ASP.NET Core
dotnetcore/CAP
Distributed transaction solution in micro-service base on eventually consistency, also an eventbus with Outbox pattern
ServiceStack/ServiceStack
Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all
Version Downloads Last updated
6.0.0 139,965 11/9/2021
6.0.0-rc.2 31,514 10/14/2021
6.0.0-rc.1 19,651 9/24/2021
6.0.0-preview7 18,398 8/16/2021
6.0.0-preview6 6,215 7/31/2021
6.0.0-preview5 14,714 7/1/2021
6.0.0-preview4 38,520 5/27/2021
6.0.0-preview3 26,172 4/15/2021
6.0.0-preview2 28,249 3/11/2021
5.0.11 18,986 11/12/2021
5.0.10 1,343,240 9/15/2021
5.0.7 3,070,482 6/13/2021
5.0.5 1,443,490 5/11/2021
5.0.4 1,920,091 3/25/2021
5.0.3 2,360,249 1/26/2021
5.0.2 2,453,782 1/19/2021
5.0.1.1 1,424,550 12/12/2020
5.0.0 2,181,449 11/15/2020
5.0.0-preview1 317,919 10/13/2020
5.0.0-alpha1 35,891 6/17/2020
4.1.10 4,734 11/12/2021
4.1.9 401,693 4/6/2021
4.1.8 1,430,721 1/21/2021
4.1.7 273,124 12/12/2020
4.1.6 472,058 11/15/2020
4.1.5 1,605,384 9/28/2020
4.1.4 2,276,542 7/19/2020
4.1.3.1 10,596,460 2/20/2020
4.1.3 5,081,810 1/31/2020
4.1.2 3,477,267 11/14/2019
4.1.1 2,097,698 10/2/2019
4.1.0 375,878 9/26/2019
4.1.0-preview2 96,471 9/4/2019
4.1.0-preview1 42,161 8/15/2019
4.0.12 31,624 5/16/2021
4.0.11 114,290 7/19/2020
4.0.10 2,998,290 9/9/2019
4.0.9 774,946 8/14/2019
4.0.8 654,333 7/18/2019
4.0.7 4,748,614 5/21/2019
4.0.6 2,374,877 4/11/2019
4.0.5 908,774 3/3/2019
4.0.4 5,384,328 12/6/2018
4.0.3 4,486,550 9/8/2018
4.0.2 2,328,614 7/8/2018
4.0.1 626,173 7/1/2018
4.0.0 1,351,900 5/30/2018
4.0.0-rc1 59,237 5/8/2018
4.0.0-preview2 66,441 4/11/2018
4.0.0-preview1 15,371 3/19/2018
3.2.7 2,533,276 2/27/2018
3.2.6 3,479,553 12/3/2017
3.2.5 3,819,785 7/25/2017
3.2.4.1 194,441 6/22/2017
3.2.4 20,776 6/13/2017
3.2.3 53,139 6/1/2017
3.2.2 1,380,059 3/21/2017
3.2.1 94,427 2/14/2017
3.2.0 49,456 1/27/2017
3.2.0-beta1 3,810 1/11/2017
3.1.10 55,499 2/14/2017
3.1.9 1,757,671 11/20/2016
3.1.8 276,468 9/24/2016
3.1.7 250,987 8/6/2016
3.1.6 87,348 7/12/2016
3.1.5 207,258 6/28/2016
3.1.4 53,300 6/16/2016
3.1.3 252,597 5/30/2016
3.1.2 43,942 5/22/2016
3.1.1 135,623 5/19/2016
3.1.0 72,199 5/16/2016
3.1.0-beta0001 3,856 5/5/2016
3.1.0-alpha6 20,999 12/7/2015
3.1.0-alpha5 7,296 11/18/2015
3.1.0-alpha4 2,677 11/18/2015
3.1.0-alpha3 5,216 10/16/2015
3.1.0-alpha2 2,897 10/16/2015
3.1.0-alpha1 3,823 9/6/2015
3.0.8 20,264 6/16/2016
3.0.7 22,679 5/3/2016
3.0.6 5,471 5/1/2016
3.0.5 189,553 1/1/2016
3.0.4 22,602 12/6/2015
3.0.3 52,151 9/27/2015
3.0.2 18,375 9/4/2015
3.0.1 25,987 8/18/2015
3.0.0 22,373 8/7/2015
3.0.0-rc0002 3,745 7/17/2015
3.0.0-rc0001 2,837 7/12/2015
3.0.0-beta0001 3,285 5/25/2015
2.2.7 275,481 9/18/2015
2.2.6 17,648 8/27/2015
2.2.5 258,375 3/11/2015
2.2.4.3 26,855 2/6/2015
2.2.4.1 10,221 2/3/2015
2.2.3 206,243 11/26/2014
2.2.2 17,967 11/1/2014
2.2.1 41,391 9/24/2014
2.2.0 18,024 9/1/2014
2.2.0-rc2 4,444 8/17/2014
2.2.0-rc1 3,054 8/5/2014
2.2.0-beta1 3,114 7/23/2014
2.1.3 49,532 4/9/2014
2.1.2 11,149 3/28/2014
2.1.1 13,300 3/21/2014
2.1.0 14,427 3/19/2014
2.1.0-rc1 3,542 2/9/2014
2.1.0-beta1 4,438 12/26/2013
2.0.14.3 59,595 12/21/2013
2.0.13-beta1 6,916 7/14/2013
2.0.12.1 54,817 12/17/2012
2.0.11 95,590 2/6/2011