Npgsql 10.0.3

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
AspNetCore.HealthChecks.NpgSql
HealthChecks.NpgSql is a health check for Postgress Sql.
22
Npgsql.EntityFrameworkCore.PostgreSQL
Npgsql.EntityFrameworkCore.PostgreSQL
20
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
20
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
21
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
23
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
24
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
27
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
30
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
36
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
40
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
41
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
66
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
19
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
20
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
21
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
23

Version Downloads Last updated
10.0.3 4 28.05.2026
10.0.2 10 14.03.2026
10.0.1 6 19.12.2025
10.0.0 10 25.11.2025
10.0.0-rc.1 11 25.10.2025
9.0.5 4 14.03.2026
9.0.4 8 23.10.2025
9.0.3 46 14.03.2025
9.0.2 44 22.12.2024
9.0.1 25 26.11.2024
8.0.9 4 14.03.2026
8.0.8 8 23.10.2025
8.0.7 17 14.03.2025
8.0.6 19 14.03.2025
8.0.5 33 19.10.2024
8.0.4 28 28.09.2024
8.0.3 35 13.05.2024
8.0.2 22 27.01.2025
8.0.1 17 22.08.2024
8.0.0 20 19.02.2025
8.0.0-rc.2 15 15.03.2025
8.0.0-preview.4 21 09.01.2025
8.0.0-preview.3 21 14.01.2025
8.0.0-preview.2 18 09.01.2025
8.0.0-preview.1 20 09.01.2025
7.0.10 19 22.04.2025
7.0.9 18 30.01.2025
7.0.8 19 23.01.2025
7.0.7 18 16.01.2025
7.0.6 18 30.01.2025
7.0.4 18 15.01.2025
7.0.2 19 18.07.2024
7.0.1 15 14.03.2025
7.0.0 20 24.01.2025
7.0.0-rc.2 16 22.08.2024
7.0.0-rc.1 18 27.01.2025
7.0.0-preview.7 19 15.01.2025
7.0.0-preview.6 17 11.01.2025
7.0.0-preview.5 18 09.01.2025
7.0.0-preview.4 20 09.01.2025
7.0.0-preview.3 19 12.01.2025
7.0.0-preview.2 16 09.01.2025
7.0.0-preview.1 17 29.07.2024
6.0.13 20 15.01.2025
6.0.12 20 24.01.2025
6.0.11 15 22.08.2024
6.0.10 17 18.02.2025
6.0.9 17 30.01.2025
6.0.8 17 30.01.2025
6.0.7 15 14.03.2025
6.0.6 18 27.07.2024
6.0.5 17 30.01.2025
6.0.4 13 14.03.2025
6.0.3 15 27.07.2024
6.0.2 18 18.02.2025
6.0.1 20 27.07.2024
6.0.0 15 18.02.2025
6.0.0-rc.2 18 18.02.2025
6.0.0-rc.1 17 30.01.2025
6.0.0-preview7 14 30.01.2025
6.0.0-preview6 22 22.08.2024
6.0.0-preview5 22 16.01.2025
6.0.0-preview4 19 11.01.2025
6.0.0-preview3 15 16.01.2025
6.0.0-preview2 20 11.01.2025
5.0.18 18 08.11.2024
5.0.17 18 30.01.2025
5.0.16 15 14.03.2025
5.0.15 19 14.01.2025
5.0.14 21 18.02.2025
5.0.13 19 23.01.2025
5.0.12 24 15.01.2025
5.0.11 18 24.01.2025
5.0.10 20 24.12.2024
5.0.7 18 14.03.2025
5.0.5 16 14.03.2025
5.0.4 14 14.03.2025
5.0.3 17 23.01.2025
5.0.2 21 24.12.2024
5.0.1.1 21 31.01.2025
5.0.0 14 14.03.2025
4.1.14 19 27.07.2024
4.1.13 16 14.03.2025
4.1.12 23 24.09.2024
4.1.11 21 29.07.2024
4.1.10 17 14.01.2025
4.1.9 16 16.01.2025
4.1.8 18 18.02.2025
4.1.7 17 18.02.2025
4.1.6 18 18.02.2025
4.1.5 18 18.02.2025
4.1.4 16 14.03.2025
4.1.3.1 18 15.01.2025
4.1.3 22 18.02.2025
4.1.2 20 23.01.2025
4.1.1 21 15.01.2025
4.1.0 19 18.02.2025
4.0.17 18 30.01.2025
4.0.16 17 23.01.2025
4.0.14 18 29.01.2025
4.0.13 19 18.02.2025
4.0.12 21 18.02.2025
4.0.11 14 18.02.2025
4.0.10 29 27.07.2024
4.0.9 19 14.03.2025
4.0.8 18 19.02.2025
4.0.7 18 23.01.2025
4.0.6 16 31.01.2025
4.0.5 18 24.01.2025
4.0.4 20 17.02.2025
4.0.3 18 30.01.2025
4.0.2 20 30.08.2024
4.0.1 14 29.07.2024
4.0.0 18 17.02.2025
4.0.0-rc1 19 18.02.2025
4.0.0-preview2 15 11.01.2025
4.0.0-preview1 20 18.02.2025
3.2.7 17 02.02.2025
3.2.6 19 27.07.2024
3.2.5 19 18.02.2025
3.2.4.1 18 18.02.2025
3.2.4 15 14.03.2025
3.2.3 18 18.02.2025
3.2.2 30 22.08.2024
3.2.1 19 18.02.2025
3.2.0 21 27.07.2024
3.1.10 19 30.01.2025
3.1.9 17 15.01.2025
3.1.8 15 19.02.2025
3.1.7 17 30.01.2025
3.1.6 17 19.02.2025
3.1.5 18 15.01.2025
3.1.4 17 14.03.2025
3.1.3 18 18.02.2025
3.1.2 16 18.02.2025
3.1.1 19 27.07.2024
3.1.0 18 14.03.2025
3.0.8 16 05.02.2025
3.0.7 17 18.02.2025
3.0.6 18 27.07.2024
3.0.5 17 18.02.2025
3.0.4 17 19.02.2025
3.0.3 17 30.01.2025
3.0.2 15 11.10.2024
3.0.1 17 18.02.2025
3.0.0 19 01.08.2024
2.2.7 17 18.02.2025
2.2.6 20 27.07.2024
2.2.5 18 14.03.2025
2.2.4.3 18 18.02.2025
2.2.4.1 14 27.07.2024
2.2.3 17 14.03.2025
2.2.2 17 18.02.2025
2.2.1 18 24.01.2025
2.2.0 12 14.03.2025
2.1.3 18 16.01.2025
2.1.2 18 17.02.2025
2.1.1 19 18.02.2025
2.1.0 16 14.03.2025
2.0.14.3 14 14.03.2025
2.0.12.1 18 17.01.2025
2.0.11 18 29.01.2025