Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DynamicParameters.ParameterNames does not provide names from "template" objects #343

Open
ashmind opened this issue Sep 16, 2015 · 3 comments

Comments

@ashmind
Copy link

ashmind commented Sep 16, 2015

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.

@chadly
Copy link

chadly commented Feb 19, 2016

👍 this is happening for me as well

@kirkgrover
Copy link

I'm having the same problem. My use case is similar to the one @ashmind gave. Is there a solution in the works for this, or does anyone know of a workaround?

@qfyra
Copy link

qfyra commented Feb 8, 2020

This is still an issue. I want to be able to iterate through the dynamic parameters for logging purposes, but can't since ParameterNames is always null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants