SqlSugar的GetList时提示Operand should contain 1 column(s)
给魔码挪车小程序写webapi某个功能时,写了如下代码:
return base.GetList(it=>ids.Length>0 && SqlFunc.ContainArray(ids,it.Id))
报错:Operand should contain 1 column(s)
经百度,提示是in子查询时出现了2个字段(in (select id,true from [xxx] where ….))
所以上面修改为:
return base.GetList(it=> SqlFunc.ContainArray(ids,it.Id))
问题解决