dapper sql ,in (xxx,xxx,xxx,xxxx)
但又不想写 string.join() 自己拼条件字符串怎么办?
demo:
var sql = $"select * from aaa where Fphm in @fphmList;";
result = con.Query<TableModel>(sql, new { fphmList }).ToList();
微信扫一扫
dapper sql ,in (xxx,xxx,xxx,xxxx)
但又不想写 string.join() 自己拼条件字符串怎么办?
demo:
var sql = $"select * from aaa where Fphm in @fphmList;";
result = con.Query<TableModel>(sql, new { fphmList }).ToList();
相关推荐