BlogDoFT.Libs.DapperUtils.Postgres
1.11.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package BlogDoFT.Libs.DapperUtils.Postgres --version 1.11.0
NuGet\Install-Package BlogDoFT.Libs.DapperUtils.Postgres -Version 1.11.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.11.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.11.0" />
<PackageReference Include="BlogDoFT.Libs.DapperUtils.Postgres" />
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.11.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BlogDoFT.Libs.DapperUtils.Postgres, 1.11.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.11.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.11.0
#tool nuget:?package=BlogDoFT.Libs.DapperUtils.Postgres&version=1.11.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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
IConnectionFactoryimplementation that reads connection string fromIConfiguration
Quick start
- Reference both
BlogDoFT.Libs.DapperUtils.AbstractionsandBlogDoFT.Libs.DapperUtils.Postgresfrom your data project. - Register the connection factory in DI and use the
IConnectionFactoryto getIDbConnectioninstances:
// 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
SearchPathtopublicby 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
DateOnlyandTimeOnlyto map to Postgres types. Ensure your database uses compatible column types.
| Product | Versions 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.
-
net9.0
- BlogDoFT.Libs.DapperUtils.Abstractions (>= 1.11.0)
- BlogDoFT.Libs.Extensions (>= 1.11.0)
- Dapper (>= 2.1.79)
- Microsoft.Extensions.Configuration (>= 9.0.19)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.19)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.19)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.19)
- Npgsql (>= 9.0.5)
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 |