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
Npgsql.EntityFrameworkCore.PostgreSQL
Npgsql.EntityFrameworkCore.PostgreSQL
35
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
31
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
33
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
34
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
35
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
37
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
39
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
249
TestContainers
Package Description
31
TestContainers
Package Description
34

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