Skip to content

Search EricksonLopez.* Ecosystem

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

Troubleshooting — EricksonLopez.DapperExtensions

Common runtime and AOT pitfalls when adopting EricksonLopez.DapperExtensions (2.0.0).

  • Symptom: Calling uow.CreateSavepointAsync("sp_step1") throws System.NotSupportedException.
  • Cause: In v2.0.0 (BC-001), NoOpSavepoint was removed. If the underlying IDbTransaction does not inherit from System.Data.Common.DbTransaction (for example, a raw IDbTransaction mock), savepoints are rejected.
  • Fix: Use a real ADO.NET DbTransaction or inherit from DbTransaction in test doubles.
  • Invalid cursorColumn (BC-003): QueryCursorPagedAsync validates cursorColumn against an identifier regex (SegmentRegex) to block SQL injection; pass a plain or quoted single column identifier ("id", "\"id\"").
  • Connection state (BC-004): BulkInsertAsync opens and closes connections it opened itself, whereas caller-opened connections remain open. Open the connection before BeginUnitOfWorkAsync or BulkInsertAsync when reusing it across multiple operations.
  • DapperStreamingExtensions.StreamAsync<T> relies on Dapper’s runtime GetRowParser<T> reflection emit (IL2026/IL3050). For Native AOT deployments, replace StreamAsync<T> with [SqlEntity] + EricksonLopez.DapperExtensions.SourceGenerators and MultiMapBuilder<T>.