Npgsql 9.0.2
Prefix Reserveddotnet add package Npgsql --version 9.0.2
NuGet\Install-Package Npgsql -Version 9.0.2
<PackageReference Include="Npgsql" Version="9.0.2" />
paket add Npgsql --version 9.0.2
#r "nuget: Npgsql, 9.0.2"
// Install Npgsql as a Cake Addin #addin nuget:?package=Npgsql&version=9.0.2 // Install Npgsql as a Cake Tool #tool nuget:?package=Npgsql&version=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
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. |
-
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.EntityFrameworkCore.PostgreSQL.Design
PostgreSQL/Npgsql provider for Entity Framework Core. |
GitHub repositories (255)
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.2 | 457,159 | 12/7/2024 | |
9.0.1 | 661,199 | 11/19/2024 | |
8.0.6 | 1,062,168 | 11/18/2024 | |
8.0.5 | 3,567,641 | 10/13/2024 | |
8.0.4 | 3,301,701 | 9/10/2024 | |
8.0.3 | 24,194,552 | 5/9/2024 | |
8.0.2 | 11,309,852 | 2/10/2024 | |
8.0.1 | 2,967,652 | 12/4/2023 | |
8.0.0 | 11,765,227 | 11/21/2023 | |
8.0.0-rc.2 | 209,393 | 10/11/2023 | |
8.0.0-preview.4 | 309,998 | 5/17/2023 | |
8.0.0-preview.3 | 58,839 | 4/24/2023 | |
8.0.0-preview.2 | 53,217 | 3/20/2023 | |
8.0.0-preview.1 | 76,486 | 3/3/2023 | |
7.0.9 | 28,255 | 11/18/2024 | |
7.0.8 | 163,830 | 9/10/2024 | |
7.0.7 | 2,726,120 | 5/9/2024 | |
7.0.6 | 12,275,834 | 9/14/2023 | |
7.0.4 | 18,693,320 | 4/24/2023 | |
7.0.2 | 10,727,292 | 2/15/2023 | |
7.0.1 | 7,672,483 | 12/17/2022 | |
7.0.0 | 6,074,078 | 11/9/2022 | |
7.0.0-rc.2 | 76,208 | 10/11/2022 | |
7.0.0-rc.1 | 38,001 | 9/16/2022 | |
7.0.0-preview.7 | 40,535 | 8/9/2022 | |
7.0.0-preview.6 | 36,689 | 7/13/2022 | |
7.0.0-preview.5 | 18,667 | 6/19/2022 | |
7.0.0-preview.4 | 41,268 | 5/11/2022 | |
7.0.0-preview.3 | 44,068 | 4/19/2022 | |
7.0.0-preview.2 | 44,108 | 3/16/2022 | |
7.0.0-preview.1 | 5,095,497 | 2/17/2022 | |
6.0.13 | 48,653 | 11/18/2024 | |
6.0.12 | 133,183 | 9/10/2024 | |
6.0.11 | 4,307,075 | 5/9/2024 | |
6.0.10 | 2,542,913 | 9/14/2023 | |
6.0.9 | 3,050,063 | 2/15/2023 | |
6.0.8 | 9,013,073 | 12/17/2022 | |
6.0.7 | 14,085,889 | 9/16/2022 | |
6.0.6 | 11,402,871 | 8/4/2022 | |
6.0.5 | 8,417,915 | 6/19/2022 | |
6.0.4 | 11,482,898 | 4/19/2022 | |
6.0.3 | 14,302,738 | 1/27/2022 | |
6.0.2 | 5,423,909 | 12/20/2021 | |
6.0.1 | 8,403,979 | 12/3/2021 | |
6.0.0 | 23,014,735 | 11/9/2021 | |
6.0.0-rc.2 | 144,288 | 10/14/2021 | |
6.0.0-rc.1 | 134,533 | 9/24/2021 | |
6.0.0-preview7 | 44,021 | 8/16/2021 | |
6.0.0-preview6 | 11,535 | 7/31/2021 | |
6.0.0-preview5 | 63,883 | 7/1/2021 | |
6.0.0-preview4 | 60,764 | 5/27/2021 | |
6.0.0-preview3 | 63,765 | 4/15/2021 | |
6.0.0-preview2 | 69,577 | 3/11/2021 | |
5.0.18 | 965,504 | 5/9/2024 | |
5.0.17 | 151,625 | 9/14/2023 | |
5.0.16 | 306,786 | 2/15/2023 | |
5.0.15 | 480,567 | 9/16/2022 | |
5.0.14 | 366,076 | 6/19/2022 | |
5.0.13 | 447,939 | 4/26/2022 | |
5.0.12 | 867,428 | 2/1/2022 | |
5.0.11 | 2,333,727 | 11/12/2021 | |
5.0.10 | 10,398,877 | 9/15/2021 | |
5.0.7 | 14,148,785 | 6/13/2021 | |
5.0.5 | 5,117,421 | 5/11/2021 | |
5.0.4 | 8,066,073 | 3/25/2021 | |
5.0.3 | 6,669,165 | 1/26/2021 | |
5.0.2 | 4,589,794 | 1/19/2021 | |
5.0.1.1 | 2,772,325 | 12/12/2020 | |
5.0.0 | 4,867,342 | 11/15/2020 | |
4.1.14 | 224,896 | 5/18/2024 | |
4.1.13 | 561,352 | 5/9/2024 | |
4.1.12 | 871,991 | 6/19/2022 | |
4.1.11 | 96,046 | 4/26/2022 | |
4.1.10 | 759,764 | 11/12/2021 | |
4.1.9 | 3,403,662 | 4/6/2021 | |
4.1.8 | 3,214,492 | 1/21/2021 | |
4.1.7 | 468,996 | 12/12/2020 | |
4.1.6 | 1,166,221 | 11/15/2020 | |
4.1.5 | 5,461,452 | 9/28/2020 | |
4.1.4 | 4,224,324 | 7/19/2020 | |
4.1.3.1 | 20,348,452 | 2/20/2020 | |
4.1.3 | 8,017,848 | 1/31/2020 | |
4.1.2 | 5,701,603 | 11/14/2019 | |
4.1.1 | 4,330,672 | 10/2/2019 | |
4.1.0 | 695,771 | 9/26/2019 | |
4.0.17 | 38,647 | 6/10/2024 | |
4.0.16 | 41,701 | 5/18/2024 | |
4.0.14 | 49,240 | 5/9/2024 | |
4.0.13 | 131,346 | 6/19/2022 | |
4.0.12 | 105,980 | 5/16/2021 | |
4.0.11 | 689,169 | 7/19/2020 | |
4.0.10 | 5,998,572 | 9/9/2019 | |
4.0.9 | 1,129,254 | 8/14/2019 | |
4.0.8 | 948,499 | 7/18/2019 | |
4.0.7 | 7,151,223 | 5/21/2019 | |
4.0.6 | 3,556,023 | 4/11/2019 | |
4.0.5 | 1,566,743 | 3/3/2019 | |
4.0.4 | 8,013,920 | 12/6/2018 | |
4.0.3 | 5,847,603 | 9/8/2018 | |
4.0.2 | 3,491,834 | 7/8/2018 | |
4.0.1 | 760,033 | 7/1/2018 | |
4.0.0 | 1,830,749 | 5/30/2018 | |
4.0.0-rc1 | 93,902 | 5/8/2018 | |
4.0.0-preview2 | 109,141 | 4/11/2018 | |
4.0.0-preview1 | 18,605 | 3/19/2018 | |
3.2.7 | 8,084,458 | 2/27/2018 | |
3.2.6 | 5,758,674 | 12/3/2017 | |
3.2.5 | 7,152,180 | 7/25/2017 | |
3.2.4.1 | 241,627 | 6/22/2017 | |
3.2.4 | 26,791 | 6/13/2017 | |
3.2.3 | 66,147 | 6/1/2017 | |
3.2.2 | 1,650,360 | 3/21/2017 | |
3.2.1 | 123,121 | 2/14/2017 | |
3.2.0 | 74,052 | 1/27/2017 | |
3.1.10 | 88,913 | 2/14/2017 | |
3.1.9 | 7,677,885 | 11/20/2016 | |
3.1.8 | 423,809 | 9/24/2016 | |
3.1.7 | 524,270 | 8/6/2016 | |
3.1.6 | 131,918 | 7/12/2016 | |
3.1.5 | 340,825 | 6/28/2016 | |
3.1.4 | 80,204 | 6/16/2016 | |
3.1.3 | 280,928 | 5/30/2016 | |
3.1.2 | 151,440 | 5/22/2016 | |
3.1.1 | 233,800 | 5/19/2016 | |
3.1.0 | 172,117 | 5/16/2016 | |
3.0.8 | 62,115 | 6/16/2016 | |
3.0.7 | 37,046 | 5/3/2016 | |
3.0.6 | 9,723 | 5/1/2016 | |
3.0.5 | 288,421 | 1/1/2016 | |
3.0.4 | 36,072 | 12/6/2015 | |
3.0.3 | 71,163 | 9/27/2015 | |
3.0.2 | 46,609 | 9/4/2015 | |
3.0.1 | 32,041 | 8/18/2015 | |
3.0.0 | 49,970 | 8/7/2015 | |
2.2.7 | 449,234 | 9/18/2015 | |
2.2.6 | 57,406 | 8/27/2015 | |
2.2.5 | 357,420 | 3/11/2015 | |
2.2.4.3 | 52,454 | 2/6/2015 | |
2.2.4.1 | 18,693 | 2/3/2015 | |
2.2.3 | 395,176 | 11/26/2014 | |
2.2.2 | 41,643 | 11/1/2014 | |
2.2.1 | 60,083 | 9/24/2014 | |
2.2.0 | 30,665 | 9/1/2014 | |
2.1.3 | 79,380 | 4/9/2014 | |
2.1.2 | 17,127 | 3/28/2014 | |
2.1.1 | 16,961 | 3/21/2014 | |
2.1.0 | 32,685 | 3/19/2014 | |
2.0.14.3 | 93,348 | 12/21/2013 | |
2.0.12.1 | 75,836 | 12/17/2012 | |
2.0.11 | 259,665 | 2/6/2011 |