Skip to content

Instantly share code, notes, and snippets.

@ChrisMoney
Last active June 25, 2024 14:54
Show Gist options
  • Save ChrisMoney/4f19dd7d1f3d365642f117020dc8ef66 to your computer and use it in GitHub Desktop.
Save ChrisMoney/4f19dd7d1f3d365642f117020dc8ef66 to your computer and use it in GitHub Desktop.
Dapper Key Value Parameter List
var dapperParams = new List<KeyValuePair<object, object>>() {
new KeyValuePair<string, string>("FirstName", "Chris"),
new KeyValuePair<string, string>("LastName", "Money"),
new KeyValuePair<string, string>("Phone", "314-555-1212"),
new KeyValuePair<string, string>("SSN", "123-45-6789"),
new KeyValuePair<string, int>("Age", 21)
};
connection.Query<Person>(query, new {dapperParams});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment