Please provide public getter to access DynamicParameters' parameters dictionary object
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 18.4k
- Forks
- 3.7k
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
Description
I am using dapper and it is really frustrating that I have no way of mocking a dapper .execute or .query call and write tests on the parameters being sent to those method calls. Get<> method does not work with a mocked IDbConnection, and I am not the only one with this issue: http://stackoverflow.com/questions/29829209/machinespecs-unit-testing-dapper
Please add a getter to the parameters, or allow a way to get not just the param names, but also the input param values.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting DynamicParameters and its existing Get<> behavior, then trace how parameters are exposed to Dapper calls. Done means a caller can access the parameter dictionary or both parameter names and input values, including when testing mocked IDbConnection Execute or Query calls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- database
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100