DapperLib / DapperLib/Dapper

Possible bug: `GridReader` constructor uses `DynamicParameters` cast instead of `IParameterCallbacks`

Open
#2,179 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage
Dominant language
C#
Stars
18.4k
Forks
3.7k
Avg merge
5h 8m
Merged PRs (30d)
1

Description

In the GridReader constructor, the parameter type is IParameterCallbacks? callbacks.
But when creating a GridReader, the code does:
command.Parameters as DynamicParameters instead of: command.Parameters as IParameterCallbacks
This makes custom implementations of IParameterCallbacks unusable, even though the constructor was designed to support them.
Should this be changed to use IParameterCallbacks instead of DynamicParameters?

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 by locating the GridReader constructor in the Dapper source and inspect how command.Parameters is converted to the callbacks parameter. Verify the behavior with a custom IParameterCallbacks implementation and existing test conventions; done means custom implementations are accepted instead of only DynamicParameters.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.