Npgsql 7.0.0-rc.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
Npgsql.EntityFrameworkCore.PostgreSQL
33
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
33
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
34
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
35
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
37
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
48
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
57
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
82
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
126
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
155
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
33
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
34
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
35
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
49
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
53
Serilog.Sinks.PostgreSQL
Serilog sink for writing to PostgreSQL table
154

Version Downloads Last updated
8.0.4 0 09/10/2024
8.0.3 35 06/27/2024
8.0.2 19 07/22/2024
8.0.1 36 02/04/2024
8.0.0 98 02/04/2024
8.0.0-rc.2 16 07/22/2024
8.0.0-preview.4 24 07/22/2024
8.0.0-preview.3 23 07/22/2024
8.0.0-preview.2 21 07/22/2024
8.0.0-preview.1 22 07/22/2024
7.0.8 0 09/10/2024
7.0.7 25 07/22/2024
7.0.6 25 07/22/2024
7.0.4 28 07/22/2024
7.0.2 83 02/04/2024
7.0.1 27 07/22/2024
7.0.0 39 02/04/2024
7.0.0-rc.2 27 07/22/2024
7.0.0-rc.1 17 07/22/2024
7.0.0-preview.7 26 07/22/2024
7.0.0-preview.6 27 07/22/2024
7.0.0-preview.5 18 07/22/2024
7.0.0-preview.4 22 07/22/2024
7.0.0-preview.3 20 07/22/2024
7.0.0-preview.2 25 07/22/2024
7.0.0-preview.1 20 07/22/2024
6.0.12 0 09/10/2024
6.0.11 28 07/22/2024
6.0.10 25 07/22/2024
6.0.9 26 07/22/2024
6.0.8 24 07/22/2024
6.0.7 31 07/22/2024
6.0.6 27 07/22/2024
6.0.5 29 07/22/2024
6.0.4 49 02/09/2024
6.0.3 55 02/04/2024
6.0.2 29 07/22/2024
6.0.1 25 07/22/2024
6.0.0 25 07/22/2024
6.0.0-rc.2 31 07/22/2024
6.0.0-rc.1 20 07/22/2024
6.0.0-preview7 32 07/22/2024
6.0.0-preview6 23 07/22/2024
6.0.0-preview5 25 07/22/2024
6.0.0-preview4 23 07/22/2024
6.0.0-preview3 19 07/22/2024
6.0.0-preview2 25 07/22/2024
5.0.18 27 07/22/2024
5.0.17 33 07/22/2024
5.0.16 30 07/22/2024
5.0.15 27 07/22/2024
5.0.14 27 07/22/2024
5.0.13 31 07/20/2024
5.0.12 30 07/22/2024
5.0.11 22 07/22/2024
5.0.10 20 07/22/2024
5.0.7 26 07/21/2024
5.0.5 71 02/04/2024
5.0.4 28 07/22/2024
5.0.3 23 07/22/2024
5.0.2 28 07/22/2024
5.0.1.1 21 07/22/2024
5.0.0 18 07/22/2024
4.1.14 19 07/22/2024
4.1.13 32 07/22/2024
4.1.12 20 07/22/2024
4.1.11 28 07/22/2024
4.1.10 26 07/21/2024
4.1.9 24 07/22/2024
4.1.8 20 07/22/2024
4.1.7 25 07/22/2024
4.1.6 28 07/22/2024
4.1.5 20 07/22/2024
4.1.4 28 07/22/2024
4.1.3.1 27 07/22/2024
4.1.3 19 07/22/2024
4.1.2 30 07/22/2024
4.1.1 27 07/22/2024
4.1.0 25 07/22/2024
4.0.17 34 07/22/2024
4.0.16 24 07/22/2024
4.0.14 28 07/22/2024
4.0.13 27 07/22/2024
4.0.12 24 07/22/2024
4.0.11 23 07/22/2024
4.0.10 25 07/22/2024
4.0.9 28 07/22/2024
4.0.8 26 07/22/2024
4.0.7 32 07/22/2024
4.0.6 27 07/22/2024
4.0.5 25 07/22/2024
4.0.4 24 07/22/2024
4.0.3 24 07/22/2024
4.0.2 32 07/22/2024
4.0.1 23 07/22/2024
4.0.0 23 07/22/2024
4.0.0-rc1 31 07/22/2024
4.0.0-preview2 22 07/22/2024
4.0.0-preview1 24 07/22/2024
3.2.7 24 07/22/2024
3.2.6 32 07/22/2024
3.2.5 32 07/22/2024
3.2.4.1 24 07/22/2024
3.2.4 32 07/22/2024
3.2.3 29 07/22/2024
3.2.2 27 07/22/2024
3.2.1 27 07/22/2024
3.2.0 23 07/22/2024
3.1.10 22 07/22/2024
3.1.9 30 07/22/2024
3.1.8 16 07/22/2024
3.1.7 25 07/22/2024
3.1.6 24 07/22/2024
3.1.5 27 07/22/2024
3.1.4 23 07/22/2024
3.1.3 33 07/22/2024
3.1.2 24 07/22/2024
3.1.1 28 07/22/2024
3.1.0 17 07/22/2024
3.0.8 24 07/22/2024
3.0.7 25 07/22/2024
3.0.6 27 07/22/2024
3.0.5 33 07/22/2024
3.0.4 33 07/22/2024
3.0.3 31 07/22/2024
3.0.2 27 07/22/2024
3.0.1 22 07/22/2024
3.0.0 23 07/22/2024
2.2.7 28 07/22/2024
2.2.6 26 07/22/2024
2.2.5 25 07/22/2024
2.2.4.3 22 07/22/2024
2.2.4.1 23 07/22/2024
2.2.3 29 07/22/2024
2.2.2 21 07/22/2024
2.2.1 31 07/22/2024
2.2.0 29 07/22/2024
2.1.3 28 07/22/2024
2.1.2 33 07/22/2024
2.1.1 29 07/22/2024
2.1.0 31 07/22/2024
2.0.14.3 30 07/22/2024
2.0.12.1 28 07/22/2024
2.0.11 17 07/22/2024