Dapper AddDynamicParams for IN statement with “dynamic” parameter name

不想你离开。 提交于 2019-11-30 05:59:46

I have just submitted a fix to the repository that allows any of the following to work correctly:

by object (this worked previously):

values.AddDynamicParams(new { ids = list });

or, by single name:

values.Add("ids", list);

or, as a dictionary:

var args = new Dictionary<string, object>();
args.Add("ids", list);
values.AddDynamicParams(args);

I have not yet deployed to NuGet. Let me know if this is a problem.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!