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
PostgreSQL/Npgsql provider for Entity Framework Core.
120
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
121
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
125
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
130
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
153
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
169
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
212
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
223
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
238
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
372
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
390
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
605
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
120
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
122
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
130
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
170
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
218
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
323
Serilog.Sinks.PostgreSQL
Serilog sink for writing to PostgreSQL table
120
Serilog.Sinks.PostgreSQL
Serilog sink for writing to PostgreSQL table
726

Version Downloads Last updated
10.0.1 16 12/19/2025
10.0.0 43 11/23/2025
10.0.0-rc.1 46 10/06/2025
9.0.4 54 10/06/2025
9.0.3 257 03/27/2025
9.0.2 110 12/07/2024
9.0.1 92 11/19/2024
9.0.0 80 11/19/2024
8.0.8 44 10/06/2025
8.0.7 74 04/02/2025
8.0.6 74 11/23/2024
8.0.5 112 10/21/2024
8.0.4 89 10/07/2024
8.0.3 136 06/27/2024
8.0.2 100 07/22/2024
8.0.1 123 02/04/2024
8.0.0 191 02/04/2024
8.0.0-rc.2 104 07/22/2024
8.0.0-preview.4 99 07/22/2024
8.0.0-preview.3 105 07/22/2024
8.0.0-preview.2 115 07/22/2024
8.0.0-preview.1 107 07/22/2024
7.0.10 84 04/02/2025
7.0.9 87 11/19/2024
7.0.8 92 10/08/2024
7.0.7 99 07/22/2024
7.0.6 100 07/22/2024
7.0.4 124 07/22/2024
7.0.2 170 02/04/2024
7.0.1 101 07/22/2024
7.0.0 128 02/04/2024
7.0.0-rc.2 106 07/22/2024
7.0.0-rc.1 88 07/22/2024
7.0.0-preview.7 111 07/22/2024
7.0.0-preview.6 116 07/22/2024
7.0.0-preview.5 112 07/22/2024
7.0.0-preview.4 118 07/22/2024
7.0.0-preview.3 106 07/22/2024
7.0.0-preview.2 99 07/22/2024
7.0.0-preview.1 108 07/22/2024
6.0.13 85 11/19/2024
6.0.12 101 10/08/2024
6.0.11 115 07/22/2024
6.0.10 105 07/22/2024
6.0.9 103 07/22/2024
6.0.8 105 07/22/2024
6.0.7 112 07/22/2024
6.0.6 108 07/22/2024
6.0.5 124 07/22/2024
6.0.4 140 02/09/2024
6.0.3 144 02/04/2024
6.0.2 114 07/22/2024
6.0.1 107 07/22/2024
6.0.0 116 07/22/2024
6.0.0-rc.2 112 07/22/2024
6.0.0-rc.1 90 07/22/2024
6.0.0-preview7 113 07/22/2024
6.0.0-preview6 112 07/22/2024
6.0.0-preview5 113 07/22/2024
6.0.0-preview4 110 07/22/2024
6.0.0-preview3 111 07/22/2024
6.0.0-preview2 117 07/22/2024
5.0.18 111 07/22/2024
5.0.17 129 07/22/2024
5.0.16 115 07/22/2024
5.0.15 114 07/22/2024
5.0.14 124 07/22/2024
5.0.13 121 07/20/2024
5.0.12 109 07/22/2024
5.0.11 115 07/22/2024
5.0.10 109 07/22/2024
5.0.7 115 07/21/2024
5.0.5 264 02/04/2024
5.0.4 117 07/22/2024
5.0.3 114 07/22/2024
5.0.2 126 07/22/2024
5.0.1.1 106 07/22/2024
5.0.0 108 07/22/2024
4.1.14 100 07/22/2024
4.1.13 121 07/22/2024
4.1.12 111 07/22/2024
4.1.11 120 07/22/2024
4.1.10 109 07/21/2024
4.1.9 105 07/22/2024
4.1.8 103 07/22/2024
4.1.7 108 07/22/2024
4.1.6 117 07/22/2024
4.1.5 107 07/22/2024
4.1.4 108 07/22/2024
4.1.3.1 123 07/22/2024
4.1.3 96 07/22/2024
4.1.2 110 07/22/2024
4.1.1 97 07/22/2024
4.1.0 114 07/22/2024
4.0.17 172 07/22/2024
4.0.16 127 07/22/2024
4.0.14 112 07/22/2024
4.0.13 101 07/22/2024
4.0.12 101 07/22/2024
4.0.11 117 07/22/2024
4.0.10 111 07/22/2024
4.0.9 117 07/22/2024
4.0.8 116 07/22/2024
4.0.7 109 07/22/2024
4.0.6 123 07/22/2024
4.0.5 102 07/22/2024
4.0.4 109 07/22/2024
4.0.3 116 07/22/2024
4.0.2 113 07/22/2024
4.0.1 101 07/22/2024
4.0.0 108 07/22/2024
4.0.0-rc1 115 07/22/2024
4.0.0-preview2 103 07/22/2024
4.0.0-preview1 109 07/22/2024
3.2.7 97 07/22/2024
3.2.6 110 07/22/2024
3.2.5 114 07/22/2024
3.2.4.1 101 07/22/2024
3.2.4 107 07/22/2024
3.2.3 111 07/22/2024
3.2.2 109 07/22/2024
3.2.1 111 07/22/2024
3.2.0 115 07/22/2024
3.1.10 105 07/22/2024
3.1.9 110 07/22/2024
3.1.8 96 07/22/2024
3.1.7 109 07/22/2024
3.1.6 99 07/22/2024
3.1.5 115 07/22/2024
3.1.4 109 07/22/2024
3.1.3 106 07/22/2024
3.1.2 95 07/22/2024
3.1.1 117 07/22/2024
3.1.0 99 07/22/2024
3.0.8 91 07/22/2024
3.0.7 109 07/22/2024
3.0.6 119 07/22/2024
3.0.5 121 07/22/2024
3.0.4 110 07/22/2024
3.0.3 103 07/22/2024
3.0.2 122 07/22/2024
3.0.1 109 07/22/2024
3.0.0 113 07/22/2024
2.2.7 123 07/22/2024
2.2.6 114 07/22/2024
2.2.5 124 07/22/2024
2.2.4.3 109 07/22/2024
2.2.4.1 118 07/22/2024
2.2.3 106 07/22/2024
2.2.2 100 07/22/2024
2.2.1 126 07/22/2024
2.2.0 106 07/22/2024
2.1.3 113 07/22/2024
2.1.2 119 07/22/2024
2.1.1 109 07/22/2024
2.1.0 124 07/22/2024
2.0.14.3 102 07/22/2024
2.0.12.1 111 07/22/2024
2.0.11 104 07/22/2024