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
YesSql.Provider.PostgreSql
Package Description
15
Npgsql.OpenTelemetry
Package Description
15
Npgsql.DependencyInjection
Package Description
15
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
14
YesSql.Provider.PostgreSql
Package Description
14

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