Skip to content

Search EricksonLopez.* Ecosystem

Type a library name, NuGet package ID, .NET type, or architectural concept to search across the portal.

EricksonLopez.Pagination Overview

L2StableNuGet: v2.0.0Local HEAD: v3.0.0AOT: Partial

EricksonLopez.Pagination (2.0.0 on NuGet, L2) delivers keyset (CursorPagedList<T>) and offset (PagedList<T>) pagination with tamper-evident HmacCursorEncoder, replay protection (ICursorReplayStore / Redis), and multi-backend adapters consumed by EricksonLopez.DapperExtensions and EricksonLopez.SqlBuilder.

  • Constant-time keyset pagination: Avoids OFFSET N table scans on deep pages (DeepOffsetWarningThreshold = 1000).
  • Cryptographic cursor integrity: HmacCursorEncoder signs cursors with >= 32-byte UTF-8 secrets, optional TTL (timeToLive), clockSkewTolerance, tenant binding (tenantContextProvider), and one-time replay prevention (ICursorReplayStore).
  • Explicit error mapping (EricksonLopez.Pagination.Result): InvalidCursor, ExpiredCursor, and ReplayedCursor map cleanly into Result<T> outcomes.
flowchart LR
Req["CursorPaginationParameters (First/After)"] --> Dec["HmacCursorEncoder (Verify HMAC + TTL + Replay)"]
Dec -- Invalid/Expired --> Err["PaginationErrors (Result.Failure)"]
Dec -- Valid --> Query["KeysetBuilder / DapperKeysetBuilder"]
Query --> Out["CursorPagedList<T> + Signed NextCursor"]
HMAC-Protected Keyset Pagination PipelineCursorPaginationParameters enters HmacCursorEncoder to validate signature, TTL, tenant, and replay store, drives DapperKeysetBuilder or EF Core KeysetBuilder, and emits CursorPagedList<T>.
View accessible text summary and structure

CursorPaginationParameters enters HmacCursorEncoder to validate signature, TTL, tenant, and replay store, drives DapperKeysetBuilder or EF Core KeysetBuilder, and emits CursorPagedList<T>.

flowchart LR
Req["CursorPaginationParameters (First/After)"] --> Dec["HmacCursorEncoder (Verify HMAC + TTL + Replay)"]
Dec -- Invalid/Expired --> Err["PaginationErrors (Result.Failure)"]
Dec -- Valid --> Query["KeysetBuilder / DapperKeysetBuilder"]
Query --> Out["CursorPagedList<T> + Signed NextCursor"]

All 17 packages are published at 2.0.0 on NuGet (7,468 total downloads; localVersion: 3.0.0 on disk). Overall AOT status is Partial (12 Full, 3 Incompatible, 2 NotApplicable):

  • Full AOT (12, net8.0;net9.0;net10.0): Pagination (1,712 dl), Abstractions (1,978 dl), AspNetCore, Blazor, Dapper, EntityFrameworkCore (*.csproj inherits IsAotCompatible=true, though ToCursorPagedListAsync remarks note Expression.Compile()), Grpc, LinqToDB, OpenApi, Redis, Relay, Result.
  • Incompatible AOT (3, net8.0;net9.0;net10.0): Cosmos, Elasticsearch, MongoDB (IsAotCompatible=false).
  • NotApplicable (2, netstandard2.0): Analyzers (PAG002–PAG008), SourceGenerators (CursorDecoderGenerator, FilterProviderGenerator).

Measured directly from BenchmarkDotNet.Artifacts (438 total rows: 435 measured, 3 na_error across 8 suites on .NET 10.0.10 X64 RyuJIT x86-64-v4; no NativeAOT reports):

  • CursorEncoderBenchmarks.EncodeBase64: 20.93 ns / 128 B (DecodeBase64: 25.37 ns / 96 B)
  • CursorEncoderBenchmarks.EncodeHmac: 283.31 ns / 768 B (DecodeHmac: 416.24 ns / 616 B)
  • EFCoreBenchmarks.WarmStart_Keyset: 1,351,000 ns (1.351 ms) / 48,302 B vs WarmStart_Offset: 1,762,000 ns (1.762 ms) / 44,339 B
  • EFCoreDeepPaginationBenchmarks.Keyset_Stability: 2,619,000 ns (2.619 ms) / 55,460 B
  • na_error disclosure (3 rows): EFCoreDeepPaginationBenchmarks.Offset_Degradation (TargetPage=1, 100, 10000) recorded Mean = NA in the benchmark artifact and is excluded from averages.