Npgsql 9.0.3
Prefix Reserveddotnet add package Npgsql --version 9.0.3
NuGet\Install-Package Npgsql -Version 9.0.3
<PackageReference Include="Npgsql" Version="9.0.3" />
<PackageVersion Include="Npgsql" Version="9.0.3" />
<PackageReference Include="Npgsql" />
paket add Npgsql --version 9.0.3
#r "nuget: Npgsql, 9.0.3"
#addin nuget:?package=Npgsql&version=9.0.3
#tool nuget:?package=Npgsql&version=9.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
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net6.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)
-
net8.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
NuGet packages (1.7K)
Showing the top 5 NuGet packages that depend on Npgsql:
Package | Downloads |
---|---|
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core. |
|
AspNetCore.HealthChecks.NpgSql
HealthChecks.NpgSql is a health check for Postgress Sql. |
|
Hangfire.PostgreSql
PostgreSql storage implementation for Hangfire (background job system for ASP.NET and aspnet core applications). |
|
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database. |
|
Npgsql.OpenTelemetry
Package Description |
GitHub repositories (244)
Showing the top 5 popular GitHub repositories that depend on Npgsql:
Repository | Stars |
---|---|
microsoft/semantic-kernel
Integrate cutting-edge LLM technology quickly and easily into your apps
|
|
DapperLib/Dapper
Dapper - a simple object mapper for .Net
|
|
Sonarr/Sonarr
Smart PVR for newsgroup and bittorrent users.
|
|
Radarr/Radarr
Movie organizer/manager for usenet and torrent users.
|
|
dotnet/orleans
Cloud Native application framework for .NET
|
Version | Downloads | Last updated | |
---|---|---|---|
9.0.3 | 1,482,308 | a month ago | |
9.0.2 | 5,639,811 | 4 months ago | |
9.0.1 | 1,561,416 | 5 months ago | |
8.0.7 | 200,259 | a month ago | |
8.0.6 | 5,490,958 | 5 months ago | |
8.0.5 | 6,731,074 | 6 months ago | |
8.0.4 | 4,932,131 | 7 months ago | |
8.0.3 | 33,836,983 | 5/9/2024 | |
8.0.2 | 13,475,523 | 2/10/2024 | |
8.0.1 | 3,266,493 | 12/4/2023 | |
8.0.0 | 14,400,503 | 11/21/2023 | |
8.0.0-rc.2 | 220,728 | 10/11/2023 | |
8.0.0-preview.4 | 343,316 | 5/17/2023 | |
8.0.0-preview.3 | 62,946 | 4/24/2023 | |
8.0.0-preview.2 | 53,814 | 3/20/2023 | |
8.0.0-preview.1 | 77,309 | 3/3/2023 | |
7.0.10 | 7,959 | 20 days ago | |
7.0.9 | 158,008 | 5 months ago | |
7.0.8 | 267,629 | 7 months ago | |
7.0.7 | 3,608,592 | 5/9/2024 | |
7.0.6 | 13,193,114 | 9/14/2023 | |
7.0.4 | 19,624,399 | 4/24/2023 | |
7.0.2 | 11,154,929 | 2/15/2023 | |
7.0.1 | 7,960,091 | 12/17/2022 | |
7.0.0 | 6,425,341 | 11/9/2022 | |
7.0.0-rc.2 | 77,294 | 10/11/2022 | |
7.0.0-rc.1 | 39,080 | 9/16/2022 | |
7.0.0-preview.7 | 40,898 | 8/9/2022 | |
7.0.0-preview.6 | 38,234 | 7/13/2022 | |
7.0.0-preview.5 | 19,150 | 6/19/2022 | |
7.0.0-preview.4 | 42,467 | 5/11/2022 | |
7.0.0-preview.3 | 44,879 | 4/19/2022 | |
7.0.0-preview.2 | 44,821 | 3/16/2022 | |
7.0.0-preview.1 | 5,699,226 | 2/17/2022 | |
6.0.13 | 235,672 | 5 months ago | |
6.0.12 | 188,168 | 7 months ago | |
6.0.11 | 6,741,381 | 5/9/2024 | |
6.0.10 | 2,739,553 | 9/14/2023 | |
6.0.9 | 3,186,003 | 2/15/2023 | |
6.0.8 | 9,457,199 | 12/17/2022 | |
6.0.7 | 14,676,836 | 9/16/2022 | |
6.0.6 | 11,700,285 | 8/4/2022 | |
6.0.5 | 8,632,660 | 6/19/2022 | |
6.0.4 | 11,801,167 | 4/19/2022 | |
6.0.3 | 14,771,248 | 1/27/2022 | |
6.0.2 | 5,525,274 | 12/20/2021 | |
6.0.1 | 8,661,118 | 12/3/2021 | |
6.0.0 | 24,628,454 | 11/9/2021 | |
6.0.0-rc.2 | 145,856 | 10/14/2021 | |
6.0.0-rc.1 | 148,901 | 9/24/2021 | |
6.0.0-preview7 | 45,083 | 8/16/2021 | |
6.0.0-preview6 | 11,628 | 7/31/2021 | |
6.0.0-preview5 | 64,010 | 7/1/2021 | |
6.0.0-preview4 | 60,985 | 5/27/2021 | |
6.0.0-preview3 | 63,973 | 4/15/2021 | |
6.0.0-preview2 | 69,890 | 3/11/2021 | |
5.0.18 | 1,462,791 | 5/9/2024 | |
5.0.17 | 163,742 | 9/14/2023 | |
5.0.16 | 316,559 | 2/15/2023 | |
5.0.15 | 495,284 | 9/16/2022 | |
5.0.14 | 376,005 | 6/19/2022 | |
5.0.13 | 474,885 | 4/26/2022 | |
5.0.12 | 909,542 | 2/1/2022 | |
5.0.11 | 2,401,734 | 11/12/2021 | |
5.0.10 | 10,669,348 | 9/15/2021 | |
5.0.7 | 14,457,638 | 6/13/2021 | |
5.0.5 | 5,422,358 | 5/11/2021 | |
5.0.4 | 8,415,096 | 3/25/2021 | |
5.0.3 | 6,798,962 | 1/26/2021 | |
5.0.2 | 4,712,440 | 1/19/2021 | |
5.0.1.1 | 2,829,296 | 12/12/2020 | |
5.0.0 | 5,013,372 | 11/15/2020 | |
4.1.14 | 383,864 | 5/18/2024 | |
4.1.13 | 873,091 | 5/9/2024 | |
4.1.12 | 909,877 | 6/19/2022 | |
4.1.11 | 98,660 | 4/26/2022 | |
4.1.10 | 765,729 | 11/12/2021 | |
4.1.9 | 3,542,843 | 4/6/2021 | |
4.1.8 | 3,266,848 | 1/21/2021 | |
4.1.7 | 475,891 | 12/12/2020 | |
4.1.6 | 1,200,414 | 11/15/2020 | |
4.1.5 | 5,515,584 | 9/28/2020 | |
4.1.4 | 4,286,246 | 7/19/2020 | |
4.1.3.1 | 20,600,970 | 2/20/2020 | |
4.1.3 | 8,144,473 | 1/31/2020 | |
4.1.2 | 5,881,302 | 11/14/2019 | |
4.1.1 | 4,555,354 | 10/2/2019 | |
4.1.0 | 707,733 | 9/26/2019 | |
4.0.17 | 67,635 | 10 months ago | |
4.0.16 | 49,229 | 5/18/2024 | |
4.0.14 | 73,190 | 5/9/2024 | |
4.0.13 | 137,765 | 6/19/2022 | |
4.0.12 | 111,444 | 5/16/2021 | |
4.0.11 | 753,904 | 7/19/2020 | |
4.0.10 | 6,181,039 | 9/9/2019 | |
4.0.9 | 1,146,049 | 8/14/2019 | |
4.0.8 | 952,671 | 7/18/2019 | |
4.0.7 | 7,242,506 | 5/21/2019 | |
4.0.6 | 3,600,711 | 4/11/2019 | |
4.0.5 | 1,611,162 | 3/3/2019 | |
4.0.4 | 8,098,140 | 12/6/2018 | |
4.0.3 | 5,880,873 | 9/8/2018 | |
4.0.2 | 3,556,648 | 7/8/2018 | |
4.0.1 | 764,926 | 7/1/2018 | |
4.0.0 | 1,851,701 | 5/30/2018 | |
4.0.0-rc1 | 94,377 | 5/8/2018 | |
4.0.0-preview2 | 109,369 | 4/11/2018 | |
4.0.0-preview1 | 18,804 | 3/19/2018 | |
3.2.7 | 8,652,560 | 2/27/2018 | |
3.2.6 | 5,831,904 | 12/3/2017 | |
3.2.5 | 7,402,234 | 7/25/2017 | |
3.2.4.1 | 242,708 | 6/22/2017 | |
3.2.4 | 27,059 | 6/13/2017 | |
3.2.3 | 67,082 | 6/1/2017 | |
3.2.2 | 1,663,443 | 3/21/2017 | |
3.2.1 | 125,329 | 2/14/2017 | |
3.2.0 | 75,715 | 1/27/2017 | |
3.1.10 | 93,017 | 2/14/2017 | |
3.1.9 | 8,407,885 | 11/20/2016 | |
3.1.8 | 444,087 | 9/24/2016 | |
3.1.7 | 533,919 | 8/6/2016 | |
3.1.6 | 132,727 | 7/12/2016 | |
3.1.5 | 382,727 | 6/28/2016 | |
3.1.4 | 81,793 | 6/16/2016 | |
3.1.3 | 283,064 | 5/30/2016 | |
3.1.2 | 155,078 | 5/22/2016 | |
3.1.1 | 240,123 | 5/19/2016 | |
3.1.0 | 178,318 | 5/16/2016 | |
3.0.8 | 65,628 | 6/16/2016 | |
3.0.7 | 37,573 | 5/3/2016 | |
3.0.6 | 9,955 | 5/1/2016 | |
3.0.5 | 293,644 | 1/1/2016 | |
3.0.4 | 36,368 | 12/6/2015 | |
3.0.3 | 74,496 | 9/27/2015 | |
3.0.2 | 46,953 | 9/4/2015 | |
3.0.1 | 32,310 | 8/18/2015 | |
3.0.0 | 51,534 | 8/7/2015 | |
2.2.7 | 458,845 | 9/18/2015 | |
2.2.6 | 60,718 | 8/27/2015 | |
2.2.5 | 361,197 | 3/11/2015 | |
2.2.4.3 | 54,134 | 2/6/2015 | |
2.2.4.1 | 19,431 | 2/3/2015 | |
2.2.3 | 414,477 | 11/26/2014 | |
2.2.2 | 41,941 | 11/1/2014 | |
2.2.1 | 61,680 | 9/24/2014 | |
2.2.0 | 31,261 | 9/1/2014 | |
2.1.3 | 80,288 | 4/9/2014 | |
2.1.2 | 17,373 | 3/28/2014 | |
2.1.1 | 17,223 | 3/21/2014 | |
2.1.0 | 32,985 | 3/19/2014 | |
2.0.14.3 | 96,882 | 12/21/2013 | |
2.0.12.1 | 77,180 | 12/17/2012 | |
2.0.11 | 279,359 | 2/6/2011 |