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.
179
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
182
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
184
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
186
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
187
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
216
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
221
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
276
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
283
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
334
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
382
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
423
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
453
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
809
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
215
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
231
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
254
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
382
Serilog.Sinks.PostgreSQL
Serilog sink for writing to PostgreSQL table
959

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