i26.Dapper 0.5.0

dotnet add package i26.Dapper --version 0.5.0
                    
NuGet\Install-Package i26.Dapper -Version 0.5.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="i26.Dapper" Version="0.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="i26.Dapper" Version="0.5.0" />
                    
Directory.Packages.props
<PackageReference Include="i26.Dapper" />
                    
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 i26.Dapper --version 0.5.0
                    
#r "nuget: i26.Dapper, 0.5.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 i26.Dapper@0.5.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=i26.Dapper&version=0.5.0
                    
Install as a Cake Addin
#tool nuget:?package=i26.Dapper&version=0.5.0
                    
Install as a Cake Tool

i26.Dapper

The same cursor pages and the same typed ids as the rest of i26, over a query you wrote by hand.

dotnet add package i26.Dapper

Typed identifiers

Dapper keeps its type handlers in static state, so this is one call at startup and never again — after it, a CourseId is a parameter and a column like any other.

TypedIdDapperExtensions.AddTypedIdHandlers(typeof(Course).Assembly);

Cursor pagination

Typed ids need one registration, at startup, since Dapper keeps its handlers in static state:

TypedIdDapperExtensions.AddTypedIdHandlers(typeof(CourseId).Assembly);

Without it, a query selecting an id column into a typed id property fails while materializing — Dapper has no conversion to fall back on. Paging is the same cursor and the same response as the ORM side, for the query that outgrew it:

using i26.Dapper.Pagination;

var page = await connection.ToPagedResponseAsync<CourseRow, CourseId>(
    """
    SELECT c."Id", c."Title", c."CreatedAt"
    FROM courses c
    JOIN enrollments e ON e."CourseId" = c."Id"
    WHERE c."TenantId" = @TenantId
    """,
    request,
    new { TenantId = tenantId },
    cancellationToken: ct);

The registration above is what turns the cursor's id back into the prefixed text the column holds, so it is not optional once the tie-breaker is a typed id.

Your query is wrapped as a derived table and the keyset predicate, the ordering and the limit go around it, so it only has to select the two ordering columns and filter. The column names are arguments — createdAtColumn, idColumn — because they are written into the statement as identifiers, which no parameter can stand in for; everything else travels as a parameter.

The paging clause is LIMIT, which Postgres, SQLite and MySQL take. On SQL Server, write the outer query yourself and build the page with CursorPage.From — the cursor and the response are the same either way.


What it drags in

Dapper, and i26.Core.


Part of i26.

Product Compatible and additional computed target framework versions.
.NET 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 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 is compatible.  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
0.5.0 126 8/13/2026
0.4.0 114 8/13/2026
0.3.1 112 8/13/2026
0.3.0 105 8/12/2026
0.2.0 99 8/12/2026
0.1.0 110 8/12/2026