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
Npgsql.EntityFrameworkCore.PostgreSQL
13
Npgsql.EntityFrameworkCore.PostgreSQL
Npgsql.EntityFrameworkCore.PostgreSQL
14
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
13
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
14
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
15
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
17
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
18
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
19
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
22
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
25
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
48
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
13

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