List<string> SeparatedPIds = new List<string> ();
if (pIds != null)
{
for (int i = 0; i < pIds.Count; i++)
{
SeparatedPIds.Add(pIds[i].ToString());
}
}
query = query.Where(p => SeparatedPIds.Where(t => ("," + p.Pid + ",").Contains("," + t + ",")).Any());
SeparatedPIds是需要查的父级区域id
pid是字符串,有可能包含多条父级区域id
需求就是获取到query的Pid包含SeparatedPIds中的pid的数据