我有一个detailcollection
集合,其中的每一个细节都有
code, price, name
并与一些代码字符串
string codes = "1,2,3";
我知道我可以使用数组string.Split()
string[] codesarray = codes.Split(',');
但我怎么能得到产品不codes
?
// the idea I have, but I would not like to have a loop
for (int i = 0; i < codesarray.Length; i++)
{
detailcollection.Where(x => x.ope_idsku == codesarray[i])
}
我想是这样的:
detailcollection.Where(x => x.ope_idsku not in (codesarray))