Expression<Func<PartJoinTable, bool>> predicate = null;
var query2 = query.Join(partJoinTableRepository.GetPartJoinQuery(),
"x.PartID", "PartID", "inner" + row + "", null);
foreach (var item1 in query)
{
list.Add(new PartJoinTable
{
ProductTypeId = item1.x.ProductTypeId,
PartId = item1.x.PartId
});
}
predicate = PredicateBuilder.True(list.AsQueryable());
if (typeid=="3")
{
if (row == 0)
{
predicate1 = predicate1.And(z => cpaclassids.Contains(z.x.ProductTypeId.ToString()));
}
else
{
predicate = predicate.And(x => cpaclassids.Contains(x.ProductTypeId.ToString()));
}
}
row++;
}
int lst1 = query.Where(predicate).Select(x => x).Distinct().ToList().Count();
无法从“System.Linq.Expressions.Expression>”转换为“System.Func<, bool>”
我无法检索结果,因为它在我声明变量时显示上述错误 Expression<Func<PartJoinTable, bool>> predicate = null;
长风秋雁
繁星淼淼
相关分类