Npgsql 10.0.1

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
16
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
15
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
16
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
17
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
19
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
236
TestContainers
Package Description
17
TestContainers
Package Description
18

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