BlogDoFT.Libs.DapperUtils.Postgres 1.12.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package BlogDoFT.Libs.DapperUtils.Postgres --version 1.12.0
                    
NuGet\Install-Package BlogDoFT.Libs.DapperUtils.Postgres -Version 1.12.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlogDoFT.Libs.DapperUtils.Postgres" Version="1.12.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlogDoFT.Libs.DapperUtils.Postgres" Version="1.12.0" />
                    
Directory.Packages.props
<PackageReference Include="BlogDoFT.Libs.DapperUtils.Postgres" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BlogDoFT.Libs.DapperUtils.Postgres --version 1.12.0
                    
#r "nuget: BlogDoFT.Libs.DapperUtils.Postgres, 1.12.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BlogDoFT.Libs.DapperUtils.Postgres@1.12.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BlogDoFT.Libs.DapperUtils.Postgres&version=1.12.0
                    
Install as a Cake Addin
#tool nuget:?package=BlogDoFT.Libs.DapperUtils.Postgres&version=1.12.0
                    
Install as a Cake Tool

BlogDoFT.Libs.DapperUtils.Postgres

Dapper utilities and helpers for Postgres. Implements abstractions for pagination, SQL builders and a connection factory tailored to Npgsql.

This package provides concrete implementations for the abstractions defined in BlogDoFT.Libs.DapperUtils.Abstractions, and includes:

  • Paginated SQL builders and pagination helpers
  • OrderBy and Where clause helpers
  • IConnectionFactory implementation that reads connection string from IConfiguration

Quick start

  1. Reference both BlogDoFT.Libs.DapperUtils.Abstractions and BlogDoFT.Libs.DapperUtils.Postgres from your data project.
  2. Register the connection factory in DI and use the IConnectionFactory to get IDbConnection instances:
// Program.cs
builder.Services.AddSingleton<IConnectionFactory>(sp =>
		new NpgConnectionFactory(sp.GetRequiredService<IConfiguration>()));

// Usage
using var conn = serviceProvider.GetRequiredService<IConnectionFactory>().GetNewConnection();
var rows = await conn.QueryAsync<MyDto>("SELECT * FROM my_table LIMIT 10");

Configuration (appsettings.json)

This library expects a connection string named Default in the ConnectionStrings section. Example:

{
	"ConnectionStrings": {
		"Default": "Host=localhost;Port=5432;Database=mydb;Username=myuser;Password=secret"
	}
}

Notes and tips

  • The Npgsql connection factory sets the SearchPath to public by default. If your schema differs, update the connection builder in a custom factory or pass schema via configuration.
  • The project registers Dapper type handlers for DateOnly and TimeOnly to map to Postgres types. Ensure your database uses compatible column types.
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.1.1 91 9/24/2026
10.1.0 90 9/14/2026
10.0.1 98 9/14/2026
10.0.0 94 9/13/2026
1.14.0 140 9/13/2026
1.13.0 86 9/13/2026
1.12.0 383 8/27/2026
1.11.0 103 8/27/2026
1.10.0 349 11/16/2025
1.9.0 248 11/5/2025
1.8.0 246 11/3/2025
1.7.0 262 11/3/2025
1.6.3 226 10/21/2025
1.6.0 228 10/21/2025
1.5.0 226 10/8/2025
1.4.0 219 10/3/2025
1.3.0 204 8/22/2025
1.2.0 234 8/9/2025
1.1.1 155 8/2/2025
1.1.0 146 8/1/2025