Skip to content

chore: remove unused convertToType locals in query iterators (#2184)#2208

Open
leno23 wants to merge 1 commit into
DapperLib:mainfrom
leno23:chore/remove-unused-converttotype-2184
Open

chore: remove unused convertToType locals in query iterators (#2184)#2208
leno23 wants to merge 1 commit into
DapperLib:mainfrom
leno23:chore/remove-unused-converttotype-2184

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 17, 2026

Summary

  • Remove dead convertToType locals in QueryAsync (buffered path), QueryUnbufferedAsync, and sync Query iterator paths.
  • GetValue<T> already handles nullable value types internally (see SqlMapper.cs around the existing Convert.ChangeType path).

No behavior change intended; this addresses the redundancy noted in #2184.

Test plan

  • Existing Dapper test suite (CI)

CI not run locally (no .NET SDK in contributor environment).

Fixes #2184

Made with Cursor

GetValue<T> already unwraps nullable types; these locals were never read.

Fixes DapperLib#2184
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Question]: Unused value in the QueryAsync<T>

1 participant