DapperLib / DapperLib/Dapper

Missed CancellationToken for QueryAsync with an arbitrary number of input types

Open
#1,181 12 comments 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:api breaking-change
Dominant language
C#
Stars
18.4k
Forks
3.7k
Avg merge
5h 8m
Merged PRs (30d)
1

Description

In methods QueryAsync with an arbitrary number of input types missed CancellationToken. In this methods initialized CommandDefinition with default(CancellationToken). CancellationToken should be moved to method parameters.

https://github.com/StackExchange/Dapper/blob/82a005953573b00b1d4c39e43568fb45449dd8e4/Dapper/SqlMapper.Async.cs#L974

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Dapper/SqlMapper.Async.cs around line 974 and inspect the QueryAsync overloads with an arbitrary number of input types. Replace the default cancellation token path with a method parameter and verify that it reaches the CommandDefinition. Done means these overloads accept and honor CancellationToken consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.