Npgsql 9.0.2
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 |
---|---|
SqlSugarCore
好用的ORM框架 .Net Core .Net5 .Net6 .Net7 安装此版本,支持国外主流和国产人大金仓达梦 QuestDb ClickHouse Oracle MySql SqlServer Sqlite, 版本说明: 5.0.3.5-Max 最低要求.Net Core 3.0+ ,5.0.0-5.0.3.4 最低要求 .Net Core 2.0+ SqlSugar ORM ,High-performance, lightweight
|
26 |
SqlSugarCore
好用的ORM框架 .Net Core .Net5 .Net6 .Net7 安装此版本,支持国外主流和国产人大金仓达梦 QuestDb ClickHouse Oracle MySql SqlServer Sqlite, 版本说明: 5.0.3.5-Max 最低要求.Net Core 3.0+ ,5.0.0-5.0.3.4 最低要求 .Net Core 2.0+ SqlSugar ORM ,High-performance, lightweight
|
25 |
sqlSugarCore
.Net Core 2.0 SqlSugar ORM ,High-performance, lightweight https://github.com/sunkaixuan/SqlSugar
|
25 |
SqlSugarCore
好用的ORM框架 .Net Core .Net5 .Net6 .Net7 安装此版本,支持国外主流和国产人大金仓达梦 QuestDb ClickHouse Oracle MySql SqlServer Sqlite, 版本说明: 5.0.3.5-Max 最低要求.Net Core 3.0+ ,5.0.0-5.0.3.4 最低要求 .Net Core 2.0+ SqlSugar ORM ,High-performance, lightweight
|
24 |
SqlSugarCore
.Net Core .Net5 .Net6 .Net7 安装此版本, 版本说明: 5.0.3.5-Max 最低要求.Net Core 3.0+ ,5.0.0-5.0.3.4 最低要求 .Net Core 2.0+ SqlSugar ORM ,High-performance, lightweight
|
24 |
SqlSugarCore
好用的ORM框架 .Net Core .Net5 .Net6 .Net7 安装此版本,支持国外主流和国产人大金仓达梦, 版本说明: 5.0.3.5-Max 最低要求.Net Core 3.0+ ,5.0.0-5.0.3.4 最低要求 .Net Core 2.0+ SqlSugar ORM ,High-performance, lightweight
|
24 |
SqlSugarCore
.Net Core .Net5 .Net6 .Net7 安装此版本, 版本说明: 5.0.3.5-Max 最低要求.Net Core 3.0+ ,5.0.0-5.0.3.4 最低要求 .Net Core 2.0+ SqlSugar ORM ,High-performance, lightweight
|
23 |
SqlSugarCore
5.0.3.5-Max 最低要求.Net Core 3.0+ ,5.0.0-5.0.3.4 最低要求 .Net Core 2.0+ SqlSugar ORM ,High-performance, lightweight
|
23 |
SqlSugarCore
.Net Core .Net5 .Net6 .Net7 安装此版本,支持国外主流和国产人大金仓达梦, 版本说明: 5.0.3.5-Max 最低要求.Net Core 3.0+ ,5.0.0-5.0.3.4 最低要求 .Net Core 2.0+ SqlSugar ORM ,High-performance, lightweight
|
23 |
SqlSugarCore
好用的ORM框架 .Net Core .Net5 .Net6 .Net7 安装此版本,支持国外主流和国产人大金仓达梦 QuestDb ClickHouse Oracle MySql SqlServer Sqlite, 版本说明: 5.0.3.5-Max 最低要求.Net Core 3.0+ ,5.0.0-5.0.3.4 最低要求 .Net Core 2.0+ SqlSugar ORM ,High-performance, lightweight
|
23 |
SqlSugarCore
好用的ORM框架 .Net Core .NetT3.1 .Net7 .Net8 安装此版本,支持国外主流和国产人大金仓达梦 OceanBase GaussDB QuestDb ClickHouse Oracle MySql SqlServer Sqlite, 版本说明: 5.0.3.5-Max 最低要求.Net Core 3.0+ ,5.0.0-5.0.3.4 最低要求 .Net Core 2.0+ SqlSugar ORM ,High-performance, lightweight
|
23 |
.NET 6.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
- System.Diagnostics.DiagnosticSource (>= 8.0.1)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- System.Text.Json (>= 8.0.5)
.NET 8.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
Version | Downloads | Last updated |
---|---|---|
9.0.2 | 2 | 12/07/2024 |
9.0.1 | 3 | 11/19/2024 |
9.0.0 | 3 | 11/18/2024 |
8.0.6 | 2 | 11/18/2024 |
8.0.5 | 6 | 10/16/2024 |
8.0.4 | 5 | 09/11/2024 |
8.0.3 | 11 | 05/15/2024 |
8.0.2 | 13 | 02/21/2024 |
8.0.1 | 19 | 12/30/2023 |
8.0.0 | 15 | 12/29/2023 |
8.0.0-rc.2 | 15 | 12/30/2023 |
8.0.0-preview.4 | 21 | 06/03/2023 |
8.0.0-preview.3 | 20 | 06/04/2023 |
8.0.0-preview.2 | 24 | 06/04/2023 |
8.0.0-preview.1 | 16 | 06/04/2023 |
7.0.9 | 4 | 11/18/2024 |
7.0.8 | 7 | 09/11/2024 |
7.0.7 | 13 | 05/21/2024 |
7.0.6 | 21 | 12/27/2023 |
7.0.4 | 19 | 06/04/2023 |
7.0.2 | 18 | 06/04/2023 |
7.0.1 | 22 | 06/04/2023 |
7.0.0 | 20 | 06/04/2023 |
7.0.0-rc.2 | 15 | 06/04/2023 |
7.0.0-rc.1 | 19 | 06/04/2023 |
7.0.0-preview.7 | 16 | 06/04/2023 |
7.0.0-preview.6 | 16 | 06/04/2023 |
7.0.0-preview.5 | 18 | 06/04/2023 |
7.0.0-preview.4 | 18 | 06/04/2023 |
7.0.0-preview.3 | 20 | 06/04/2023 |
7.0.0-preview.2 | 18 | 06/04/2023 |
7.0.0-preview.1 | 21 | 06/04/2023 |
6.0.13 | 3 | 11/18/2024 |
6.0.12 | 5 | 09/11/2024 |
6.0.11 | 12 | 05/15/2024 |
6.0.10 | 13 | 10/31/2023 |
6.0.9 | 21 | 06/04/2023 |
6.0.8 | 22 | 06/04/2023 |
6.0.7 | 23 | 06/04/2023 |
6.0.6 | 21 | 06/04/2023 |
6.0.5 | 19 | 06/04/2023 |
6.0.4 | 19 | 06/04/2023 |
6.0.3 | 22 | 06/04/2023 |
6.0.2 | 19 | 06/04/2023 |
6.0.1 | 19 | 06/04/2023 |
6.0.0 | 21 | 03/22/2023 |
6.0.0-rc.2 | 22 | 06/04/2023 |
6.0.0-rc.1 | 19 | 06/04/2023 |
6.0.0-preview7 | 17 | 06/04/2023 |
6.0.0-preview6 | 18 | 06/04/2023 |
6.0.0-preview5 | 18 | 06/04/2023 |
6.0.0-preview4 | 22 | 06/04/2023 |
6.0.0-preview3 | 22 | 06/04/2023 |
6.0.0-preview2 | 16 | 06/04/2023 |
5.0.18 | 9 | 05/15/2024 |
5.0.17 | 14 | 12/29/2023 |
5.0.16 | 18 | 06/04/2023 |
5.0.15 | 14 | 06/04/2023 |
5.0.14 | 21 | 06/04/2023 |
5.0.13 | 17 | 06/04/2023 |
5.0.12 | 17 | 06/04/2023 |
5.0.11 | 19 | 06/04/2023 |
5.0.10 | 21 | 06/04/2023 |
5.0.7 | 22 | 06/04/2023 |
5.0.5 | 18 | 06/04/2023 |
5.0.4 | 15 | 06/04/2023 |
5.0.3 | 19 | 06/04/2023 |
5.0.2 | 20 | 06/04/2023 |
5.0.1.1 | 19 | 06/04/2023 |
5.0.0 | 18 | 06/04/2023 |
4.1.14 | 8 | 05/22/2024 |
4.1.13 | 9 | 05/15/2024 |
4.1.12 | 19 | 06/04/2023 |
4.1.11 | 16 | 06/04/2023 |
4.1.10 | 18 | 06/04/2023 |
4.1.9 | 18 | 06/04/2023 |
4.1.8 | 22 | 06/04/2023 |
4.1.7 | 16 | 06/04/2023 |
4.1.6 | 17 | 06/04/2023 |
4.1.5 | 23 | 06/04/2023 |
4.1.4 | 16 | 06/04/2023 |
4.1.3.1 | 14 | 06/04/2023 |
4.1.3 | 21 | 06/04/2023 |
4.1.2 | 17 | 06/04/2023 |
4.1.1 | 21 | 06/04/2023 |
4.1.0 | 26 | 06/04/2023 |
4.0.17 | 7 | 06/10/2024 |
4.0.16 | 11 | 05/21/2024 |
4.0.14 | 12 | 05/15/2024 |
4.0.13 | 17 | 06/04/2023 |
4.0.12 | 15 | 06/04/2023 |
4.0.11 | 22 | 06/04/2023 |
4.0.10 | 17 | 06/04/2023 |
4.0.9 | 20 | 06/04/2023 |
4.0.8 | 17 | 06/04/2023 |
4.0.7 | 17 | 06/04/2023 |
4.0.6 | 22 | 06/04/2023 |
4.0.5 | 20 | 06/04/2023 |
4.0.4 | 22 | 06/04/2023 |
4.0.3 | 19 | 06/04/2023 |
4.0.2 | 20 | 06/04/2023 |
4.0.1 | 22 | 06/04/2023 |
4.0.0 | 19 | 06/04/2023 |
4.0.0-rc1 | 14 | 06/04/2023 |
4.0.0-preview2 | 21 | 06/04/2023 |
4.0.0-preview1 | 14 | 06/04/2023 |
3.2.7 | 28 | 04/14/2021 |
3.2.6 | 22 | 06/04/2023 |
3.2.5 | 19 | 06/04/2023 |
3.2.4.1 | 20 | 06/04/2023 |
3.2.4 | 17 | 06/04/2023 |
3.2.3 | 19 | 06/04/2023 |
3.2.2 | 20 | 06/04/2023 |
3.2.1 | 20 | 06/04/2023 |
3.2.0 | 18 | 06/04/2023 |
3.1.10 | 20 | 06/04/2023 |
3.1.9 | 20 | 06/04/2023 |
3.1.8 | 19 | 06/04/2023 |
3.1.7 | 18 | 06/04/2023 |
3.1.6 | 19 | 06/04/2023 |
3.1.5 | 20 | 06/04/2023 |
3.1.4 | 17 | 06/04/2023 |
3.1.3 | 17 | 06/04/2023 |
3.1.2 | 18 | 06/04/2023 |
3.1.1 | 19 | 06/04/2023 |
3.1.0 | 18 | 06/04/2023 |
3.0.8 | 15 | 06/04/2023 |
3.0.7 | 16 | 06/04/2023 |
3.0.6 | 20 | 06/04/2023 |
3.0.5 | 23 | 06/04/2023 |
3.0.4 | 24 | 06/04/2023 |
3.0.3 | 20 | 06/04/2023 |
3.0.2 | 19 | 06/04/2023 |
3.0.1 | 19 | 06/04/2023 |
3.0.0 | 16 | 06/04/2023 |
2.2.7 | 17 | 06/04/2023 |
2.2.6 | 18 | 06/03/2023 |
2.2.5 | 16 | 06/03/2023 |
2.2.4.3 | 17 | 06/03/2023 |
2.2.4.1 | 20 | 06/03/2023 |
2.2.3 | 21 | 06/03/2023 |
2.2.2 | 18 | 06/03/2023 |
2.2.1 | 16 | 06/03/2023 |
2.2.0 | 18 | 06/03/2023 |
2.1.3 | 18 | 06/03/2023 |
2.1.2 | 21 | 06/03/2023 |
2.1.1 | 22 | 06/03/2023 |
2.1.0 | 18 | 06/03/2023 |
2.0.14.3 | 18 | 06/03/2023 |
2.0.12.1 | 13 | 06/03/2023 |
2.0.11 | 14 | 06/03/2023 |