DynamicParameters.RemoveUnused does not remove IEnumerable-parameters
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 18.4k
- Forks
- 3.7k
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
Description
If you use a "collection" parameter, that is unused in command text, it's not removed according to RemoveUnused
int[] list = new[] { 1, 2, 3 };
params.Add("ids", list);
Under the hood Dapper actually adds parameters named @ids1, @ids2, @ids3 and they're not removed if unused in query-text (you can see it with SQL trace)
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 at DynamicParameters.RemoveUnused and trace how IEnumerable values are expanded into named parameters such as @ids1, @ids2, and @ids3. Reproduce the issue with the sample collection parameter and an SQL command that does not reference it; done means the expanded unused parameters are removed as RemoveUnused expects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, sql
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100