Npgsql 10.0.0

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.
38
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
37
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
35
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
34
AspNetCore.HealthChecks.NpgSql
HealthChecks.NpgSql is a health check for Postgress Sql.
34
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
33

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