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 (918)

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 (154)

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 65,744 11/9/2021
6.0.0-rc.2 26,675 10/14/2021
6.0.0-rc.1 18,577 9/24/2021
6.0.0-preview7 17,772 8/16/2021
6.0.0-preview6 6,184 7/31/2021
6.0.0-preview5 14,334 7/1/2021
6.0.0-preview4 37,959 5/27/2021
6.0.0-preview3 25,853 4/15/2021
6.0.0-preview2 27,249 3/11/2021
5.0.11 5,404 11/12/2021
5.0.10 1,146,765 9/15/2021
5.0.7 2,896,270 6/13/2021
5.0.5 1,386,020 5/11/2021
5.0.4 1,861,939 3/25/2021
5.0.3 2,275,403 1/26/2021
5.0.2 2,395,625 1/19/2021
5.0.1.1 1,392,574 12/12/2020
5.0.0 2,141,888 11/15/2020
5.0.0-preview1 312,637 10/13/2020
5.0.0-alpha1 35,582 6/17/2020
4.1.10 1,589 11/12/2021
4.1.9 367,357 4/6/2021
4.1.8 1,384,025 1/21/2021
4.1.7 268,962 12/12/2020
4.1.6 456,998 11/15/2020
4.1.5 1,533,827 9/28/2020
4.1.4 2,232,237 7/19/2020
4.1.3.1 10,391,608 2/20/2020
4.1.3 5,014,396 1/31/2020
4.1.2 3,430,863 11/14/2019
4.1.1 2,064,846 10/2/2019
4.1.0 366,390 9/26/2019
4.1.0-preview2 95,906 9/4/2019
4.1.0-preview1 37,823 8/15/2019
4.0.12 30,480 5/16/2021
4.0.11 112,505 7/19/2020
4.0.10 2,946,407 9/9/2019
4.0.9 766,125 8/14/2019
4.0.8 649,606 7/18/2019
4.0.7 4,661,495 5/21/2019
4.0.6 2,333,600 4/11/2019
4.0.5 893,277 3/3/2019
4.0.4 5,294,642 12/6/2018
4.0.3 4,440,666 9/8/2018
4.0.2 2,307,774 7/8/2018
4.0.1 621,607 7/1/2018
4.0.0 1,342,408 5/30/2018
4.0.0-rc1 57,757 5/8/2018
4.0.0-preview2 64,544 4/11/2018
4.0.0-preview1 15,296 3/19/2018
3.2.7 2,493,086 2/27/2018
3.2.6 3,429,189 12/3/2017
3.2.5 3,747,222 7/25/2017
3.2.4.1 192,885 6/22/2017
3.2.4 20,691 6/13/2017
3.2.3 53,011 6/1/2017
3.2.2 1,372,963 3/21/2017
3.2.1 93,682 2/14/2017
3.2.0 48,506 1/27/2017
3.2.0-beta1 3,806 1/11/2017
3.1.10 55,108 2/14/2017
3.1.9 1,717,487 11/20/2016
3.1.8 275,634 9/24/2016
3.1.7 248,872 8/6/2016
3.1.6 86,487 7/12/2016
3.1.5 205,274 6/28/2016
3.1.4 52,824 6/16/2016
3.1.3 252,157 5/30/2016
3.1.2 43,479 5/22/2016
3.1.1 134,934 5/19/2016
3.1.0 71,507 5/16/2016
3.1.0-beta0001 3,849 5/5/2016
3.1.0-alpha6 20,987 12/7/2015
3.1.0-alpha5 7,290 11/18/2015
3.1.0-alpha4 2,672 11/18/2015
3.1.0-alpha3 5,209 10/16/2015
3.1.0-alpha2 2,889 10/16/2015
3.1.0-alpha1 3,818 9/6/2015
3.0.8 20,069 6/16/2016
3.0.7 22,636 5/3/2016
3.0.6 5,437 5/1/2016
3.0.5 188,800 1/1/2016
3.0.4 22,275 12/6/2015
3.0.3 51,779 9/27/2015
3.0.2 18,045 9/4/2015
3.0.1 25,936 8/18/2015
3.0.0 22,230 8/7/2015
3.0.0-rc0002 3,737 7/17/2015
3.0.0-rc0001 2,829 7/12/2015
3.0.0-beta0001 3,280 5/25/2015
2.2.7 273,624 9/18/2015
2.2.6 17,575 8/27/2015
2.2.5 255,136 3/11/2015
2.2.4.3 26,542 2/6/2015
2.2.4.1 10,149 2/3/2015
2.2.3 204,902 11/26/2014
2.2.2 17,786 11/1/2014
2.2.1 41,230 9/24/2014
2.2.0 17,774 9/1/2014
2.2.0-rc2 4,390 8/17/2014
2.2.0-rc1 3,009 8/5/2014
2.2.0-beta1 3,078 7/23/2014
2.1.3 47,799 4/9/2014
2.1.2 10,920 3/28/2014
2.1.1 13,195 3/21/2014
2.1.0 13,410 3/19/2014
2.1.0-rc1 3,500 2/9/2014
2.1.0-beta1 4,402 12/26/2013
2.0.14.3 59,172 12/21/2013
2.0.13-beta1 6,647 7/14/2013
2.0.12.1 54,489 12/17/2012
2.0.11 92,940 2/6/2011