I' using Dapper in my project. I have a list of SqlParameters and I want to send it to Dapper. But Dapper needs an object (name, value). How can I convert a SqlParameter to an object. I know this doesn't work:
conn.Query<TModel>(sql, parameters.Select(p => new {p.ParameterName=p.Value}))
any suggestions?