Npgsql (8.0.6)

Published 2026-11-23 16:41:13 +00:00 by demo-admin

Installation

dotnet nuget add source --name demo-admin --username your_username --password your_token 
dotnet add package --source demo-admin --version 8.0.6 Npgsql

About this package

Npgsql is the open source .NET data provider for PostgreSQL.

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.

Dependencies

ID Version Target Framework
Microsoft.Bcl.HashCode 1.1.1 .NETStandard2.0
Microsoft.Extensions.Logging.Abstractions 8.0.0 .NETStandard2.0
System.Collections.Immutable 8.0.0 .NETStandard2.0
System.Diagnostics.DiagnosticSource 8.0.0 .NETStandard2.0
System.Runtime.CompilerServices.Unsafe 6.0.0 .NETStandard2.0
System.Text.Json 8.0.5 .NETStandard2.0
System.Threading.Channels 8.0.0 .NETStandard2.0
Microsoft.Extensions.Logging.Abstractions 8.0.0 .NETStandard2.1
System.Collections.Immutable 8.0.0 .NETStandard2.1
System.Diagnostics.DiagnosticSource 8.0.0 .NETStandard2.1
System.Runtime.CompilerServices.Unsafe 6.0.0 .NETStandard2.1
System.Text.Json 8.0.5 .NETStandard2.1
System.Threading.Channels 8.0.0 .NETStandard2.1
Microsoft.Extensions.Logging.Abstractions 8.0.0 net6.0
System.Diagnostics.DiagnosticSource 8.0.0 net6.0
System.Runtime.CompilerServices.Unsafe 6.0.0 net6.0
System.Text.Json 8.0.5 net6.0
Microsoft.Extensions.Logging.Abstractions 8.0.0 net7.0
Microsoft.Extensions.Logging.Abstractions 8.0.0 net8.0
Details
NuGet
2026-11-23 16:41:13 +00:00
2
Shay Rojansky,Nikita Kazmin,Brar Piening,Nino Floris,Yoh Deadfall,Austin Drenski,Emil Lenngren,Francisco Figueiredo Jr.,Kenji Uno
2.7 MiB
Assets (2)
Versions (1) View all
8.0.6 2026-11-23