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.
118
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
119
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
120
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
124
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
130
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
151
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
168
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
211
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
219
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
234
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
372
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
389
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
557
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
118
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
119
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
129
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
167
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.
284
Serilog.Sinks.PostgreSQL
Serilog sink for writing to PostgreSQL table
691

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