过滤我需要一个GROUPBY此查询GROUPBY在LINQ
if (Randomize)
{
List<tblInvoice> _Result = db.tblInvoices.ToList();
var _Temp = xxx.Where(p => (p.isPostalPayment == null || p.isPostalPayment == false)).ToList();
_Result = _Temp.OrderBy(o => Guid.NewGuid()).Take(5).ToList();
_Result = _Result.GroupBy(x => x.cUserID).ToList();
return _Result;
}
,当我在查询中使用GROUPBY,错误 当我在这个查询中使用GROUPBY,得到了在错误
无法隐式转换键入 'System.Collections.Generic.List>' 到 'System.Collections.Generic.List'
该错误没有完全引用,这不会帮助人们找出您的问题。 Christos已经解决了......他的回答是正确的。 – Corey