Npgsql 8.0.6
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,886 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
88 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
879 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
1,631 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
6,069 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
10,717 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
14,926 |
Npgsql.EntityFrameworkCore.PostgreSQL.Design
Npgsql.EntityFrameworkCore.PostgreSQL.Design
|
3,874 |
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.
|
75 |
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
|
77 |
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
|
82 |
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
|
83 |
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
|
89 |
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
|
91 |
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
|
92 |
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
|
93 |
Npgsql.NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
|
103 |
.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 |
---|---|---|
9.0.2 | 3 | 12/13/2024 |
9.0.1 | 3 | 11/26/2024 |
9.0.0 | 3 | 12/14/2024 |
8.0.6 | 2 | 11/26/2024 |
8.0.5 | 10 | 10/14/2024 |
8.0.4 | 9 | 09/11/2024 |
8.0.3 | 14 | 05/22/2024 |
8.0.2 | 19 | 02/16/2024 |
8.0.1 | 14 | 12/05/2023 |
8.0.0 | 13 | 11/21/2023 |
8.0.0-rc.2 | 14 | 10/13/2023 |
8.0.0-preview.4 | 24 | 05/31/2023 |
8.0.0-preview.3 | 45 | 05/09/2023 |
8.0.0-preview.2 | 33 | 04/04/2023 |
8.0.0-preview.1 | 26 | 04/04/2023 |
7.0.9 | 2 | 11/26/2024 |
7.0.8 | 7 | 09/12/2024 |
7.0.7 | 9 | 05/22/2024 |
7.0.6 | 12 | 09/25/2023 |
7.0.4 | 28 | 06/07/2023 |
7.0.2 | 33 | 04/04/2023 |
7.0.1 | 20 | 01/15/2023 |
7.0.0 | 1,585 | 11/15/2022 |
7.0.0-rc.2 | 94 | 12/01/2022 |
7.0.0-rc.1 | 59 | 09/22/2022 |
7.0.0-preview.7 | 30 | 09/04/2022 |
7.0.0-preview.6 | 86 | 07/30/2022 |
7.0.0-preview.5 | 81 | 09/08/2022 |
7.0.0-preview.4 | 39 | 09/07/2022 |
7.0.0-preview.3 | 24 | 09/08/2022 |
7.0.0-preview.2 | 71 | 09/02/2022 |
7.0.0-preview.1 | 17 | 09/07/2022 |
6.0.13 | 3 | 11/26/2024 |
6.0.12 | 10 | 09/11/2024 |
6.0.11 | 9 | 05/22/2024 |
6.0.10 | 11 | 09/27/2023 |
6.0.9 | 29 | 04/04/2023 |
6.0.8 | 6,066 | 01/15/2023 |
6.0.7 | 14,286 | 09/21/2022 |
6.0.6 | 72 | 09/03/2022 |
6.0.5 | 32 | 08/21/2022 |
6.0.4 | 61 | 08/25/2022 |
6.0.3 | 170 | 06/28/2022 |
6.0.2 | 40 | 09/02/2022 |
6.0.1 | 66 | 08/21/2022 |
6.0.0 | 45 | 09/03/2022 |
6.0.0-rc.2 | 86 | 08/25/2022 |
6.0.0-rc.1 | 40 | 08/23/2022 |
6.0.0-preview7 | 37 | 09/05/2022 |
6.0.0-preview6 | 58 | 08/24/2022 |
6.0.0-preview5 | 40 | 08/04/2022 |
6.0.0-preview4 | 52 | 08/24/2022 |
6.0.0-preview3 | 15 | 08/22/2022 |
6.0.0-preview2 | 56 | 08/25/2022 |
5.0.18 | 12 | 05/22/2024 |
5.0.17 | 12 | 09/23/2023 |
5.0.16 | 40 | 04/04/2023 |
5.0.15 | 40 | 09/22/2022 |
5.0.14 | 78 | 08/24/2022 |
5.0.13 | 20 | 09/08/2022 |
5.0.12 | 49 | 09/02/2022 |
5.0.11 | 25 | 09/02/2022 |
5.0.10 | 10,625 | 06/27/2022 |
5.0.7 | 22 | 09/09/2022 |
5.0.5 | 56 | 09/07/2022 |
5.0.4 | 62 | 08/23/2022 |
5.0.3 | 52 | 09/03/2022 |
5.0.2 | 24 | 09/09/2022 |
5.0.1.1 | 57 | 09/08/2022 |
5.0.0 | 80 | 08/02/2022 |
4.1.14 | 12 | 05/22/2024 |
4.1.13 | 11 | 05/15/2024 |
4.1.12 | 31 | 08/23/2022 |
4.1.11 | 29 | 09/09/2022 |
4.1.10 | 42 | 08/27/2022 |
4.1.9 | 36 | 09/10/2022 |
4.1.8 | 77 | 08/22/2022 |
4.1.7 | 32 | 09/02/2022 |
4.1.6 | 23 | 09/07/2022 |
4.1.5 | 59 | 09/08/2022 |
4.1.4 | 39 | 09/03/2022 |
4.1.3.1 | 18 | 09/07/2022 |
4.1.3 | 85 | 09/09/2022 |
4.1.2 | 41 | 09/09/2022 |
4.1.1 | 70 | 09/03/2022 |
4.1.0 | 58 | 08/26/2022 |
4.0.17 | 9 | 06/10/2024 |
4.0.16 | 11 | 05/22/2024 |
4.0.14 | 12 | 05/22/2024 |
4.0.13 | 42 | 08/23/2022 |
4.0.12 | 50 | 09/09/2022 |
4.0.11 | 37 | 09/02/2022 |
4.0.10 | 74 | 09/09/2022 |
4.0.9 | 36 | 09/02/2022 |
4.0.8 | 24 | 08/21/2022 |
4.0.7 | 54 | 09/03/2022 |
4.0.6 | 30 | 09/02/2022 |
4.0.5 | 37 | 08/22/2022 |
4.0.4 | 26 | 09/02/2022 |
4.0.3 | 74 | 09/07/2022 |
4.0.2 | 74 | 09/09/2022 |
4.0.1 | 91 | 09/02/2022 |
4.0.0 | 86 | 08/20/2022 |
4.0.0-rc1 | 20 | 09/07/2022 |
4.0.0-preview2 | 34 | 08/24/2022 |
4.0.0-preview1 | 31 | 09/02/2022 |
3.2.7 | 34 | 06/29/2022 |
3.2.6 | 37 | 07/02/2022 |
3.2.5 | 59 | 09/07/2022 |
3.2.4.1 | 20 | 07/31/2022 |
3.2.4 | 34 | 08/22/2022 |
3.2.3 | 47 | 07/05/2022 |
3.2.2 | 25 | 08/24/2022 |
3.2.1 | 35 | 09/08/2022 |
3.2.0 | 87 | 09/02/2022 |
3.1.10 | 72 | 09/07/2022 |
3.1.9 | 3,876 | 06/27/2022 |
3.1.8 | 19 | 09/08/2022 |
3.1.7 | 37 | 08/15/2022 |
3.1.6 | 24 | 09/04/2022 |
3.1.5 | 31 | 09/06/2022 |
3.1.4 | 15 | 09/08/2022 |
3.1.3 | 50 | 07/31/2022 |
3.1.2 | 79 | 09/08/2022 |
3.1.1 | 80 | 08/23/2022 |
3.1.0 | 84 | 08/23/2022 |
3.0.8 | 34 | 09/08/2022 |
3.0.7 | 64 | 08/24/2022 |
3.0.6 | 83 | 07/31/2022 |
3.0.5 | 23 | 09/03/2022 |
3.0.4 | 32 | 07/11/2022 |
3.0.3 | 43 | 08/21/2022 |
3.0.2 | 64 | 09/07/2022 |
3.0.1 | 37 | 08/26/2022 |
3.0.0 | 25 | 08/22/2022 |
2.2.7 | 69 | 09/02/2022 |
2.2.6 | 20 | 07/01/2022 |
2.2.5 | 21 | 08/27/2022 |
2.2.4.3 | 31 | 08/24/2022 |
2.2.4.1 | 30 | 09/09/2022 |
2.2.3 | 38 | 09/08/2022 |
2.2.2 | 45 | 09/09/2022 |
2.2.1 | 22 | 08/21/2022 |
2.2.0 | 39 | 08/22/2022 |
2.1.3 | 32 | 09/08/2022 |
2.1.2 | 64 | 07/13/2022 |
2.1.1 | 47 | 08/24/2022 |
2.1.0 | 102 | 09/10/2022 |
2.0.14.3 | 57 | 09/02/2022 |
2.0.12.1 | 31 | 08/24/2022 |
2.0.11 | 56 | 08/26/2022 |