Npgsql 7.0.0-preview.4

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
PostgreSQL/Npgsql provider for Entity Framework Core.
55
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
37
Npgsql.EntityFrameworkCore.PostgreSQL
Npgsql.EntityFrameworkCore.PostgreSQL
29
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
25
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
24
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
20
Hangfire.PostgreSql
PostgreSql storage implementation for Hangfire (background job system for ASP.NET applications).
20
Hangfire.PostgreSql
PostgreSql storage implementation for Hangfire (background job system for ASP.NET applications).
19
Hangfire.PostgreSql
PostgreSql storage implementation for Hangfire (background job system for ASP.NET and aspnet core applications).
19
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
18
Hangfire.PostgreSql
PostgreSql storage implementation for Hangfire (background job system for ASP.NET and aspnet core applications).
18
Hangfire.PostgreSql
PostgreSql storage implementation for Hangfire (background job system for ASP.NET applications).
18

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