DynamicParameters.ParameterNames does not provide names from "template" objects
Open
Nobody has claimed this yet.
needs-investigation
- Dominant language
- C#
- Stars
- 18.4k
- Forks
- 3.7k
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
Description
Example
var dynamic = new DynamicParameters(new { test = "Test" });
Assert.IsTrue(dynamic.ParameterNames.Contains("test")); // fails
Use case
I have a method that accepts two objects and merges them into a single parameter set.
Since AddDynamicParams does not fail if same names exist in both objects, I need a way to check it myself before merging them.
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 locating DynamicParameters and reviewing how ParameterNames and AddDynamicParams handle template objects. Add a regression test based on the provided example, and verify that ParameterNames includes names from constructed template parameters while preserving the merging use case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100