Npgsql 8.0.5
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.
Related packages
- The Entity Framework Core provider that works with this provider is Npgsql.EntityFrameworkCore.PostgreSQL.
- Spatial plugin to work with PostgreSQL PostGIS: Npgsql.NetTopologySuite
- NodaTime plugin to use better date/time types with PostgreSQL: Npgsql.NodaTime
- OpenTelemetry support can be set up with Npgsql.OpenTelemetry
Showing the top 20 packages that depend on Npgsql.
Packages | Downloads |
---|---|
Npgsql.EntityFrameworkCore.PostgreSQL
Npgsql.EntityFrameworkCore.PostgreSQL
|
3,849 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
86 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
878 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
1,629 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
5,960 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
10,625 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
14,840 |
Npgsql.EntityFrameworkCore.PostgreSQL.Design
Npgsql.EntityFrameworkCore.PostgreSQL.Design
|
3,836 |
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
|
70 |
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
|
72 |
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
|
73 |
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
|
80 |
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
|
81 |
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
|
84 |
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
|
85 |
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
|
86 |
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
|
90 |
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
|
97 |
.NET 6.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- System.Text.Json (>= 8.0.5)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- System.Diagnostics.DiagnosticSource (>= 8.0.0)
.NET Standard 2.1
- System.Threading.Channels (>= 8.0.0)
- System.Text.Json (>= 8.0.5)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- System.Diagnostics.DiagnosticSource (>= 8.0.0)
- System.Collections.Immutable (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
.NET Standard 2.0
- System.Text.Json (>= 8.0.5)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- System.Threading.Channels (>= 8.0.0)
- System.Collections.Immutable (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- Microsoft.Bcl.HashCode (>= 1.1.1)
- System.Diagnostics.DiagnosticSource (>= 8.0.0)
.NET 8.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
.NET 7.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
Version | Downloads | Last updated |
---|---|---|
8.0.5 | 8 | 10/14/2024 |
8.0.4 | 8 | 09/11/2024 |
8.0.3 | 12 | 05/22/2024 |
8.0.2 | 17 | 02/16/2024 |
8.0.1 | 13 | 12/05/2023 |
8.0.0 | 11 | 11/21/2023 |
8.0.0-rc.2 | 13 | 10/13/2023 |
8.0.0-preview.4 | 23 | 05/31/2023 |
8.0.0-preview.3 | 44 | 05/09/2023 |
8.0.0-preview.2 | 32 | 04/04/2023 |
8.0.0-preview.1 | 24 | 04/04/2023 |
7.0.8 | 6 | 09/12/2024 |
7.0.7 | 8 | 05/22/2024 |
7.0.6 | 11 | 09/25/2023 |
7.0.4 | 27 | 06/07/2023 |
7.0.2 | 30 | 04/04/2023 |
7.0.1 | 18 | 01/15/2023 |
7.0.0 | 1,584 | 11/15/2022 |
7.0.0-rc.2 | 90 | 12/01/2022 |
7.0.0-rc.1 | 57 | 09/22/2022 |
7.0.0-preview.7 | 29 | 09/04/2022 |
7.0.0-preview.6 | 82 | 07/30/2022 |
7.0.0-preview.5 | 79 | 09/08/2022 |
7.0.0-preview.4 | 37 | 09/07/2022 |
7.0.0-preview.3 | 22 | 09/08/2022 |
7.0.0-preview.2 | 70 | 09/02/2022 |
7.0.0-preview.1 | 16 | 09/07/2022 |
6.0.12 | 9 | 09/11/2024 |
6.0.11 | 8 | 05/22/2024 |
6.0.10 | 10 | 09/27/2023 |
6.0.9 | 27 | 04/04/2023 |
6.0.8 | 5,955 | 01/15/2023 |
6.0.7 | 14,209 | 09/21/2022 |
6.0.6 | 69 | 09/03/2022 |
6.0.5 | 30 | 08/21/2022 |
6.0.4 | 60 | 08/25/2022 |
6.0.3 | 168 | 06/28/2022 |
6.0.2 | 38 | 09/02/2022 |
6.0.1 | 64 | 08/21/2022 |
6.0.0 | 44 | 09/03/2022 |
6.0.0-rc.2 | 80 | 08/25/2022 |
6.0.0-rc.1 | 38 | 08/23/2022 |
6.0.0-preview7 | 36 | 09/05/2022 |
6.0.0-preview6 | 57 | 08/24/2022 |
6.0.0-preview5 | 38 | 08/04/2022 |
6.0.0-preview4 | 50 | 08/24/2022 |
6.0.0-preview3 | 14 | 08/22/2022 |
6.0.0-preview2 | 54 | 08/25/2022 |
5.0.18 | 10 | 05/22/2024 |
5.0.17 | 10 | 09/23/2023 |
5.0.16 | 38 | 04/04/2023 |
5.0.15 | 39 | 09/22/2022 |
5.0.14 | 77 | 08/24/2022 |
5.0.13 | 19 | 09/08/2022 |
5.0.12 | 47 | 09/02/2022 |
5.0.11 | 23 | 09/02/2022 |
5.0.10 | 10,534 | 06/27/2022 |
5.0.7 | 21 | 09/09/2022 |
5.0.5 | 54 | 09/07/2022 |
5.0.4 | 60 | 08/23/2022 |
5.0.3 | 50 | 09/03/2022 |
5.0.2 | 23 | 09/09/2022 |
5.0.1.1 | 56 | 09/08/2022 |
5.0.0 | 77 | 08/02/2022 |
4.1.14 | 10 | 05/22/2024 |
4.1.13 | 10 | 05/15/2024 |
4.1.12 | 29 | 08/23/2022 |
4.1.11 | 28 | 09/09/2022 |
4.1.10 | 41 | 08/27/2022 |
4.1.9 | 35 | 09/10/2022 |
4.1.8 | 74 | 08/22/2022 |
4.1.7 | 31 | 09/02/2022 |
4.1.6 | 22 | 09/07/2022 |
4.1.5 | 57 | 09/08/2022 |
4.1.4 | 38 | 09/03/2022 |
4.1.3.1 | 17 | 09/07/2022 |
4.1.3 | 82 | 09/09/2022 |
4.1.2 | 40 | 09/09/2022 |
4.1.1 | 67 | 09/03/2022 |
4.1.0 | 55 | 08/26/2022 |
4.0.17 | 6 | 06/10/2024 |
4.0.16 | 10 | 05/22/2024 |
4.0.14 | 10 | 05/22/2024 |
4.0.13 | 40 | 08/23/2022 |
4.0.12 | 48 | 09/09/2022 |
4.0.11 | 36 | 09/02/2022 |
4.0.10 | 71 | 09/09/2022 |
4.0.9 | 34 | 09/02/2022 |
4.0.8 | 22 | 08/21/2022 |
4.0.7 | 52 | 09/03/2022 |
4.0.6 | 28 | 09/02/2022 |
4.0.5 | 36 | 08/22/2022 |
4.0.4 | 23 | 09/02/2022 |
4.0.3 | 72 | 09/07/2022 |
4.0.2 | 71 | 09/09/2022 |
4.0.1 | 89 | 09/02/2022 |
4.0.0 | 84 | 08/20/2022 |
4.0.0-rc1 | 19 | 09/07/2022 |
4.0.0-preview2 | 32 | 08/24/2022 |
4.0.0-preview1 | 29 | 09/02/2022 |
3.2.7 | 31 | 06/29/2022 |
3.2.6 | 36 | 07/02/2022 |
3.2.5 | 57 | 09/07/2022 |
3.2.4.1 | 18 | 07/31/2022 |
3.2.4 | 32 | 08/22/2022 |
3.2.3 | 46 | 07/05/2022 |
3.2.2 | 24 | 08/24/2022 |
3.2.1 | 34 | 09/08/2022 |
3.2.0 | 85 | 09/02/2022 |
3.1.10 | 69 | 09/07/2022 |
3.1.9 | 3,839 | 06/27/2022 |
3.1.8 | 18 | 09/08/2022 |
3.1.7 | 35 | 08/15/2022 |
3.1.6 | 23 | 09/04/2022 |
3.1.5 | 29 | 09/06/2022 |
3.1.4 | 13 | 09/08/2022 |
3.1.3 | 48 | 07/31/2022 |
3.1.2 | 77 | 09/08/2022 |
3.1.1 | 75 | 08/23/2022 |
3.1.0 | 81 | 08/23/2022 |
3.0.8 | 33 | 09/08/2022 |
3.0.7 | 62 | 08/24/2022 |
3.0.6 | 79 | 07/31/2022 |
3.0.5 | 21 | 09/03/2022 |
3.0.4 | 31 | 07/11/2022 |
3.0.3 | 42 | 08/21/2022 |
3.0.2 | 62 | 09/07/2022 |
3.0.1 | 36 | 08/26/2022 |
3.0.0 | 24 | 08/22/2022 |
2.2.7 | 66 | 09/02/2022 |
2.2.6 | 19 | 07/01/2022 |
2.2.5 | 19 | 08/27/2022 |
2.2.4.3 | 28 | 08/24/2022 |
2.2.4.1 | 25 | 09/09/2022 |
2.2.3 | 37 | 09/08/2022 |
2.2.2 | 43 | 09/09/2022 |
2.2.1 | 20 | 08/21/2022 |
2.2.0 | 37 | 08/22/2022 |
2.1.3 | 31 | 09/08/2022 |
2.1.2 | 60 | 07/13/2022 |
2.1.1 | 46 | 08/24/2022 |
2.1.0 | 95 | 09/10/2022 |
2.0.14.3 | 56 | 09/02/2022 |
2.0.12.1 | 30 | 08/24/2022 |
2.0.11 | 55 | 08/26/2022 |