Npgsql 10.0.0

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.
111
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
112
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
113
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
115
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
125
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
144
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
159
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
196
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
197
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
226
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
364
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
382
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
513
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
110
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
114
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
121
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
157
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
207
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
268
Serilog.Sinks.PostgreSQL
Serilog sink for writing to PostgreSQL table
661

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