Npgsql 6.0.9

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.
182
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
187
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
189
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
194
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
222
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
223
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
281
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
287
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
340
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
386
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
427
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
457
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
814
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
219
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
236
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
258
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
384
Serilog.Sinks.PostgreSQL
Serilog sink for writing to PostgreSQL table
961

Version Downloads Last updated
10.0.3 51 05/27/2026
10.0.2 83 03/13/2026
10.0.1 95 12/19/2025
10.0.0 212 11/23/2025
10.0.0-rc.1 118 10/06/2025
9.0.5 51 03/14/2026
9.0.4 116 10/06/2025
9.0.3 328 03/27/2025
9.0.2 169 12/07/2024
9.0.1 169 11/19/2024
9.0.0 147 11/19/2024
8.0.9 64 03/14/2026
8.0.8 104 10/06/2025
8.0.7 132 04/02/2025
8.0.6 149 11/23/2024
8.0.5 195 10/21/2024
8.0.4 148 10/07/2024
8.0.3 199 06/27/2024
8.0.2 170 07/22/2024
8.0.1 193 02/04/2024
8.0.0 270 02/04/2024
8.0.0-rc.2 170 07/22/2024
8.0.0-preview.4 161 07/22/2024
8.0.0-preview.3 180 07/22/2024
8.0.0-preview.2 181 07/22/2024
8.0.0-preview.1 172 07/22/2024
7.0.10 156 04/02/2025
7.0.9 149 11/19/2024
7.0.8 145 10/08/2024
7.0.7 153 07/22/2024
7.0.6 148 07/22/2024
7.0.4 194 07/22/2024
7.0.2 235 02/04/2024
7.0.1 148 07/22/2024
7.0.0 176 02/04/2024
7.0.0-rc.2 161 07/22/2024
7.0.0-rc.1 140 07/22/2024
7.0.0-preview.7 158 07/22/2024
7.0.0-preview.6 173 07/22/2024
7.0.0-preview.5 178 07/22/2024
7.0.0-preview.4 177 07/22/2024
7.0.0-preview.3 170 07/22/2024
7.0.0-preview.2 159 07/22/2024
7.0.0-preview.1 184 07/22/2024
6.0.13 138 11/19/2024
6.0.12 159 10/08/2024
6.0.11 184 07/22/2024
6.0.10 163 07/22/2024
6.0.9 169 07/22/2024
6.0.8 179 07/22/2024
6.0.7 185 07/22/2024
6.0.6 159 07/22/2024
6.0.5 180 07/22/2024
6.0.4 219 02/09/2024
6.0.3 204 02/04/2024
6.0.2 200 07/22/2024
6.0.1 162 07/22/2024
6.0.0 179 07/22/2024
6.0.0-rc.2 177 07/22/2024
6.0.0-rc.1 152 07/22/2024
6.0.0-preview7 161 07/22/2024
6.0.0-preview6 166 07/22/2024
6.0.0-preview5 177 07/22/2024
6.0.0-preview4 169 07/22/2024
6.0.0-preview3 168 07/22/2024
6.0.0-preview2 167 07/22/2024
5.0.18 172 07/22/2024
5.0.17 173 07/22/2024
5.0.16 172 07/22/2024
5.0.15 166 07/22/2024
5.0.14 198 07/22/2024
5.0.13 180 07/20/2024
5.0.12 158 07/22/2024
5.0.11 163 07/22/2024
5.0.10 161 07/22/2024
5.0.7 182 07/21/2024
5.0.5 337 02/04/2024
5.0.4 172 07/22/2024
5.0.3 181 07/22/2024
5.0.2 200 07/22/2024
5.0.1.1 170 07/22/2024
5.0.0 160 07/22/2024
4.1.14 165 07/22/2024
4.1.13 175 07/22/2024
4.1.12 186 07/22/2024
4.1.11 180 07/22/2024
4.1.10 176 07/21/2024
4.1.9 182 07/22/2024
4.1.8 160 07/22/2024
4.1.7 173 07/22/2024
4.1.6 160 07/22/2024
4.1.5 164 07/22/2024
4.1.4 161 07/22/2024
4.1.3.1 187 07/22/2024
4.1.3 174 07/22/2024
4.1.2 195 07/22/2024
4.1.1 170 07/22/2024
4.1.0 193 07/22/2024
4.0.17 281 07/22/2024
4.0.16 186 07/22/2024
4.0.14 166 07/22/2024
4.0.13 168 07/22/2024
4.0.12 163 07/22/2024
4.0.11 179 07/22/2024
4.0.10 181 07/22/2024
4.0.9 185 07/22/2024
4.0.8 180 07/22/2024
4.0.7 169 07/22/2024
4.0.6 184 07/22/2024
4.0.5 157 07/22/2024
4.0.4 159 07/22/2024
4.0.3 175 07/22/2024
4.0.2 197 07/22/2024
4.0.1 170 07/22/2024
4.0.0 155 07/22/2024
4.0.0-rc1 192 07/22/2024
4.0.0-preview2 172 07/22/2024
4.0.0-preview1 170 07/22/2024
3.2.7 175 07/22/2024
3.2.6 164 07/22/2024
3.2.5 169 07/22/2024
3.2.4.1 172 07/22/2024
3.2.4 163 07/22/2024
3.2.3 143 07/22/2024
3.2.2 174 07/22/2024
3.2.1 180 07/22/2024
3.2.0 177 07/22/2024
3.1.10 151 07/22/2024
3.1.9 169 07/22/2024
3.1.8 162 07/22/2024
3.1.7 175 07/22/2024
3.1.6 166 07/22/2024
3.1.5 165 07/22/2024
3.1.4 155 07/22/2024
3.1.3 170 07/22/2024
3.1.2 162 07/22/2024
3.1.1 164 07/22/2024
3.1.0 175 07/22/2024
3.0.8 153 07/22/2024
3.0.7 180 07/22/2024
3.0.6 170 07/22/2024
3.0.5 174 07/22/2024
3.0.4 176 07/22/2024
3.0.3 171 07/22/2024
3.0.2 185 07/22/2024
3.0.1 181 07/22/2024
3.0.0 173 07/22/2024
2.2.7 171 07/22/2024
2.2.6 176 07/22/2024
2.2.5 197 07/22/2024
2.2.4.3 177 07/22/2024
2.2.4.1 192 07/22/2024
2.2.3 184 07/22/2024
2.2.2 195 07/22/2024
2.2.1 206 07/22/2024
2.2.0 177 07/22/2024
2.1.3 154 07/22/2024
2.1.2 173 07/22/2024
2.1.1 173 07/22/2024
2.1.0 182 07/22/2024
2.0.14.3 167 07/22/2024
2.0.12.1 165 07/22/2024
2.0.11 167 07/22/2024