Npgsql 6.0.9

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.

Showing the top 20 packages that depend on Npgsql.

Packages Downloads
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
23
EntityFramework6.Npgsql
PostgreSQL provider for Entity Framework 6
20
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
20
AspNetCore.HealthChecks.NpgSql
HealthChecks.NpgSql is a health check for Postgress Sql.
20
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
19
Npgsql.EntityFrameworkCore.PostgreSQL
Npgsql.EntityFrameworkCore.PostgreSQL
19

Version Downloads Last updated
9.0.3 16 02/27/2025
9.0.2 14 12/15/2024
9.0.1 18 11/23/2024
8.0.7 13 03/01/2025
8.0.6 19 11/23/2024
8.0.5 17 11/28/2024
8.0.4 13 09/11/2024
8.0.3 19 10/03/2024
8.0.2 17 07/24/2024
8.0.1 17 10/09/2024
8.0.0 18 03/30/2024
8.0.0-rc.2 14 10/05/2024
8.0.0-preview.4 17 10/09/2024
8.0.0-preview.3 12 10/09/2024
8.0.0-preview.2 17 10/09/2024
8.0.0-preview.1 15 10/09/2024
7.0.10 11 03/31/2025
7.0.9 12 11/23/2024
7.0.8 18 10/09/2024
7.0.7 15 10/09/2024
7.0.6 13 10/09/2024
7.0.4 18 10/09/2024
7.0.2 17 10/09/2024
7.0.1 14 10/09/2024
7.0.0 12 10/03/2024
7.0.0-rc.2 15 10/09/2024
7.0.0-rc.1 15 10/03/2024
7.0.0-preview.7 16 10/08/2024
7.0.0-preview.6 12 10/09/2024
7.0.0-preview.5 13 10/09/2024
7.0.0-preview.4 19 10/09/2024
7.0.0-preview.3 15 10/05/2024
7.0.0-preview.2 14 10/09/2024
7.0.0-preview.1 12 10/09/2024
6.0.13 15 11/23/2024
6.0.12 17 10/09/2024
6.0.11 14 10/09/2024
6.0.10 15 10/09/2024
6.0.9 13 10/05/2024
6.0.8 13 10/09/2024
6.0.7 16 10/05/2024
6.0.6 14 12/11/2022
6.0.5 12 10/09/2024
6.0.4 19 10/09/2024
6.0.3 16 10/08/2024
6.0.2 17 10/09/2024
6.0.1 15 10/09/2024
6.0.0 17 10/09/2024
6.0.0-rc.2 16 10/09/2024
6.0.0-rc.1 19 10/09/2024
6.0.0-preview7 17 10/09/2024
6.0.0-preview6 13 10/09/2024
6.0.0-preview5 18 10/09/2024
6.0.0-preview4 16 10/09/2024
6.0.0-preview3 17 10/08/2024
6.0.0-preview2 13 10/09/2024
5.0.18 15 10/09/2024
5.0.17 12 10/09/2024
5.0.16 15 10/09/2024
5.0.15 15 10/09/2024
5.0.14 19 10/06/2024
5.0.13 17 10/05/2024
5.0.12 19 10/09/2024
5.0.11 17 10/09/2024
5.0.10 16 10/09/2024
5.0.7 16 05/16/2023
5.0.5 12 10/03/2024
5.0.4 17 10/09/2024
5.0.3 12 10/09/2024
5.0.2 18 10/09/2024
5.0.1.1 16 10/09/2024
5.0.0 15 10/04/2024
4.1.14 18 10/09/2024
4.1.13 13 10/09/2024
4.1.12 17 10/09/2024
4.1.11 14 10/09/2024
4.1.10 18 10/09/2024
4.1.9 14 10/03/2024
4.1.8 19 10/02/2024
4.1.7 17 10/09/2024
4.1.6 16 10/09/2024
4.1.5 14 10/09/2024
4.1.4 17 10/09/2024
4.1.3.1 18 10/09/2024
4.1.3 17 10/09/2024
4.1.2 18 10/09/2024
4.1.1 14 10/08/2024
4.1.0 14 10/02/2024
4.0.17 14 10/09/2024
4.0.16 16 10/09/2024
4.0.14 16 10/04/2024
4.0.13 16 10/09/2024
4.0.12 17 10/09/2024
4.0.11 18 10/03/2024
4.0.10 16 10/09/2024
4.0.9 15 10/09/2024
4.0.8 19 10/06/2024
4.0.7 18 10/09/2024
4.0.6 16 10/03/2024
4.0.5 18 10/09/2024
4.0.4 19 10/09/2024
4.0.3 15 10/09/2024
4.0.2 14 10/04/2024
4.0.1 13 10/09/2024
4.0.0 18 10/06/2024
4.0.0-rc1 15 10/06/2024
4.0.0-preview2 14 10/07/2024
4.0.0-preview1 17 10/03/2024
3.2.7 12 10/09/2024
3.2.6 17 10/09/2024
3.2.5 15 10/09/2024
3.2.4.1 15 10/09/2024
3.2.4 18 10/09/2024
3.2.3 16 10/04/2024
3.2.2 17 10/05/2024
3.2.1 17 10/09/2024
3.2.0 17 10/09/2024
3.1.10 15 10/09/2024
3.1.9 15 10/04/2024
3.1.8 17 10/09/2024
3.1.7 17 10/09/2024
3.1.6 12 10/04/2024
3.1.5 13 10/09/2024
3.1.4 16 10/09/2024
3.1.3 17 10/09/2024
3.1.2 15 10/09/2024
3.1.1 17 10/09/2024
3.1.0 15 10/04/2024
3.0.8 17 10/03/2024
3.0.7 14 10/09/2024
3.0.6 17 10/09/2024
3.0.5 17 10/09/2024
3.0.4 17 10/09/2024
3.0.3 14 10/09/2024
3.0.2 14 10/09/2024
3.0.1 16 10/09/2024
3.0.0 15 10/09/2024
2.2.7 18 10/09/2024
2.2.6 18 10/09/2024
2.2.5 15 10/09/2024
2.2.4.3 15 10/03/2024
2.2.4.1 13 10/05/2024
2.2.3 14 10/04/2024
2.2.2 18 10/09/2024
2.2.1 17 10/09/2024
2.2.0 18 10/03/2024
2.1.3 18 10/09/2024
2.1.2 16 10/04/2024
2.1.1 17 10/09/2024
2.1.0 15 10/09/2024
2.0.14.3 15 10/09/2024
2.0.12.1 14 10/09/2024
2.0.11 15 10/09/2024