Npgsql 8.0.3
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
PostgreSQL/Npgsql provider for Entity Framework Core.
|
1 |
|
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
2 |
|
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
30 |
|
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
|
1 |
|
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
|
3 |
|
sqlSugarCore
.Net Core 2.0 SqlSugar ORM ,High-performance, lightweight https://github.com/sunkaixuan/SqlSugar
|
5 |
|
SqlSugarCore
.Net Core3.1 .Net5 .Net6 .Net7 .Net8 安装此版本,好用的ORM框架 ,支持国外主流和国产人大金仓达梦 OceanBase GaussDB QuestDb ClickHouse Oracle MySql Gbase8s SqlServer Sqlite 等, 使用教程:https://www.donet5.com/Home/Doc?typeId=1226
|
1 |
|
SqlSugarCore
.Net Core3.1 .Net5 .Net6 .Net7 .Net8 安装此版本,好用的ORM框架 ,支持国外主流和国产人大金仓达梦 OceanBase GaussDB QuestDb ClickHouse Oracle MySql Gbase8s SqlServer Sqlite 等, 使用教程:https://www.donet5.com/Home/Doc?typeId=1226
|
2 |
|
SqlSugarCore
.Net Core3.1 .Net5 .Net6 .Net7 .Net8 安装此版本,好用的ORM框架 ,支持国外主流和国产人大金仓达梦 OceanBase GaussDB QuestDb ClickHouse Oracle MySql Gbase8s SqlServer Sqlite 等, 使用教程:https://www.donet5.com/Home/Doc?typeId=1226
|
3 |
|
SqlSugarCore
.Net Core3.1 .Net5 .Net6 .Net7 .Net8 安装此版本,好用的ORM框架 ,支持国外主流和国产人大金仓达梦 OceanBase GaussDB QuestDb ClickHouse Oracle MySql Gbase8s SqlServer Sqlite 等, 使用教程:https://www.donet5.com/Home/Doc?typeId=1226
|
4 |
|
SqlSugarCore
.Net Core3.1 .Net5 .Net6 .Net7 .Net8 .Net9 .Net10 安装此版本,好用的ORM框架 ,支持国外主流和国产人大金仓达梦 OceanBase GaussDB QuestDb ClickHouse Oracle MySql Gbase8s SqlServer Sqlite DB2 DuckDb Hana 等, 使用教程:https://www.donet5.com/Home/Doc?typeId=1226
|
3 |
|
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
|
1 |
|
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
|
2 |
|
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
|
4 |
.NET 6.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- System.Text.Json (>= 8.0.0)
- 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.0)
- 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.0)
- 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 |
|---|---|---|
| 10.0.2 | 0 | 2026/3/12 |
| 10.0.1 | 0 | 2025/12/19 |
| 10.0.0 | 0 | 2025/11/22 |
| 10.0.0-rc.1 | 0 | 2025/10/5 |
| 9.0.5 | 0 | 2026/3/12 |
| 9.0.4 | 0 | 2025/10/5 |
| 9.0.3 | 0 | 2025/2/24 |
| 9.0.2 | 0 | 2024/12/7 |
| 9.0.1 | 0 | 2024/11/19 |
| 8.0.9 | 0 | 2026/3/12 |
| 8.0.8 | 0 | 2025/10/5 |
| 8.0.7 | 0 | 2025/2/24 |
| 8.0.6 | 1 | 2025/4/29 |
| 8.0.5 | 2 | 2025/4/29 |
| 8.0.4 | 0 | 2024/9/10 |
| 8.0.3 | 1 | 2025/4/29 |
| 8.0.2 | 0 | 2024/2/10 |
| 8.0.1 | 0 | 2023/12/4 |
| 8.0.0 | 0 | 2023/11/21 |
| 8.0.0-rc.2 | 0 | 2023/10/11 |
| 8.0.0-preview.4 | 0 | 2023/5/17 |
| 8.0.0-preview.3 | 0 | 2023/4/24 |
| 8.0.0-preview.2 | 0 | 2023/3/20 |
| 8.0.0-preview.1 | 0 | 2023/3/3 |
| 7.0.10 | 0 | 2025/3/17 |
| 7.0.9 | 0 | 2024/11/18 |
| 7.0.8 | 0 | 2024/9/10 |
| 7.0.7 | 0 | 2024/5/9 |
| 7.0.6 | 0 | 2023/9/14 |
| 7.0.4 | 0 | 2023/4/24 |
| 7.0.2 | 0 | 2023/2/15 |
| 7.0.1 | 0 | 2022/12/17 |
| 7.0.0 | 0 | 2022/11/9 |
| 7.0.0-rc.2 | 0 | 2022/10/11 |
| 7.0.0-rc.1 | 0 | 2022/9/16 |
| 7.0.0-preview.7 | 0 | 2022/8/9 |
| 7.0.0-preview.6 | 0 | 2022/7/13 |
| 7.0.0-preview.5 | 0 | 2022/6/19 |
| 7.0.0-preview.4 | 0 | 2022/5/11 |
| 7.0.0-preview.3 | 0 | 2022/4/19 |
| 7.0.0-preview.2 | 0 | 2022/3/16 |
| 7.0.0-preview.1 | 0 | 2022/2/17 |
| 6.0.13 | 0 | 2024/11/18 |
| 6.0.12 | 0 | 2024/9/10 |
| 6.0.11 | 0 | 2024/5/9 |
| 6.0.10 | 0 | 2023/9/14 |
| 6.0.9 | 0 | 2023/2/15 |
| 6.0.8 | 0 | 2022/12/17 |
| 6.0.7 | 0 | 2022/9/16 |
| 6.0.6 | 0 | 2022/8/4 |
| 6.0.5 | 0 | 2022/6/19 |
| 6.0.4 | 0 | 2022/4/19 |
| 6.0.3 | 0 | 2022/1/27 |
| 6.0.2 | 0 | 2021/12/20 |
| 6.0.1 | 0 | 2021/12/3 |
| 6.0.0 | 0 | 2021/11/9 |
| 6.0.0-rc.2 | 0 | 2021/10/14 |
| 6.0.0-rc.1 | 0 | 2021/9/24 |
| 6.0.0-preview7 | 0 | 2021/8/16 |
| 6.0.0-preview6 | 0 | 2021/7/31 |
| 6.0.0-preview5 | 0 | 2021/7/1 |
| 6.0.0-preview4 | 0 | 2021/5/27 |
| 6.0.0-preview3 | 0 | 2021/4/15 |
| 6.0.0-preview2 | 0 | 2021/3/11 |
| 5.0.18 | 10 | 2024/10/12 |
| 5.0.17 | 0 | 2023/9/14 |
| 5.0.16 | 0 | 2023/2/15 |
| 5.0.15 | 0 | 2022/9/16 |
| 5.0.14 | 0 | 2022/6/19 |
| 5.0.13 | 0 | 2022/4/26 |
| 5.0.12 | 0 | 2022/2/1 |
| 5.0.11 | 0 | 2021/11/12 |
| 5.0.10 | 0 | 2021/9/15 |
| 5.0.7 | 6 | 2024/11/18 |
| 5.0.5 | 0 | 2021/5/11 |
| 5.0.4 | 0 | 2021/3/25 |
| 5.0.3 | 0 | 2021/1/26 |
| 5.0.2 | 0 | 2021/1/19 |
| 5.0.1.1 | 0 | 2020/12/12 |
| 5.0.0 | 0 | 2020/11/15 |
| 4.1.14 | 0 | 2024/5/18 |
| 4.1.13 | 0 | 2024/5/9 |
| 4.1.12 | 0 | 2022/6/19 |
| 4.1.11 | 0 | 2022/4/26 |
| 4.1.10 | 0 | 2021/11/12 |
| 4.1.9 | 35 | 2024/12/4 |
| 4.1.8 | 0 | 2021/1/21 |
| 4.1.7 | 0 | 2020/12/12 |
| 4.1.6 | 0 | 2020/11/15 |
| 4.1.5 | 3 | 2025/4/29 |
| 4.1.4 | 0 | 2020/7/19 |
| 4.1.3.1 | 0 | 2020/2/20 |
| 4.1.3 | 0 | 2020/1/31 |
| 4.1.2 | 0 | 2019/11/14 |
| 4.1.1 | 0 | 2019/10/2 |
| 4.1.0 | 0 | 2019/9/26 |
| 4.0.17 | 0 | 2024/6/10 |
| 4.0.16 | 0 | 2024/5/18 |
| 4.0.14 | 0 | 2024/5/9 |
| 4.0.13 | 0 | 2022/6/19 |
| 4.0.12 | 0 | 2021/5/16 |
| 4.0.11 | 0 | 2020/7/19 |
| 4.0.10 | 0 | 2019/9/9 |
| 4.0.9 | 0 | 2019/8/14 |
| 4.0.8 | 0 | 2019/7/18 |
| 4.0.7 | 0 | 2019/5/21 |
| 4.0.6 | 0 | 2019/4/11 |
| 4.0.5 | 0 | 2019/3/3 |
| 4.0.4 | 0 | 2018/12/6 |
| 4.0.3 | 0 | 2018/9/8 |
| 4.0.2 | 0 | 2018/7/8 |
| 4.0.1 | 0 | 2018/7/1 |
| 4.0.0 | 0 | 2018/5/30 |
| 4.0.0-rc1 | 0 | 2018/5/8 |
| 4.0.0-preview2 | 0 | 2018/4/11 |
| 4.0.0-preview1 | 0 | 2018/3/19 |
| 3.2.7 | 5 | 2025/3/3 |
| 3.2.6 | 0 | 2017/12/3 |
| 3.2.5 | 0 | 2017/7/25 |
| 3.2.4.1 | 0 | 2017/6/22 |
| 3.2.4 | 0 | 2017/6/13 |
| 3.2.3 | 0 | 2017/6/1 |
| 3.2.2 | 0 | 2017/3/21 |
| 3.2.1 | 0 | 2017/2/14 |
| 3.2.0 | 0 | 2017/1/27 |
| 3.1.10 | 0 | 2017/2/14 |
| 3.1.9 | 0 | 2016/11/20 |
| 3.1.8 | 0 | 2016/9/24 |
| 3.1.7 | 0 | 2016/8/6 |
| 3.1.6 | 0 | 2016/7/12 |
| 3.1.5 | 0 | 2016/6/28 |
| 3.1.4 | 0 | 2016/6/16 |
| 3.1.3 | 0 | 2016/5/30 |
| 3.1.2 | 0 | 2016/5/22 |
| 3.1.1 | 0 | 2016/5/19 |
| 3.1.0 | 0 | 2016/5/16 |
| 3.0.8 | 0 | 2016/6/16 |
| 3.0.7 | 0 | 2016/5/3 |
| 3.0.6 | 0 | 2016/5/1 |
| 3.0.5 | 0 | 2016/1/1 |
| 3.0.4 | 0 | 2015/12/6 |
| 3.0.3 | 0 | 2015/9/27 |
| 3.0.2 | 0 | 2015/9/4 |
| 3.0.1 | 0 | 2015/8/18 |
| 3.0.0 | 0 | 2015/8/7 |
| 2.2.7 | 0 | 2015/9/18 |
| 2.2.6 | 0 | 2015/8/27 |
| 2.2.5 | 0 | 2015/3/11 |
| 2.2.4.3 | 0 | 2015/2/6 |
| 2.2.4.1 | 0 | 2015/2/3 |
| 2.2.3 | 0 | 2014/11/26 |
| 2.2.2 | 0 | 2014/11/1 |
| 2.2.1 | 0 | 2014/9/24 |
| 2.2.0 | 0 | 2014/9/1 |
| 2.1.3 | 0 | 2014/4/9 |
| 2.1.2 | 0 | 2014/3/28 |
| 2.1.1 | 0 | 2014/3/21 |
| 2.1.0 | 0 | 2014/3/19 |
| 2.0.14.3 | 0 | 2013/12/21 |
| 2.0.12.1 | 0 | 2012/12/17 |
| 2.0.11 | 0 | 2011/2/6 |