【发布时间】:2016-02-06 18:04:11
【问题描述】:
我需要这个查询的分组
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 时,得到 Under 错误
不能隐式转换类型 'System.Collections.Generic.List>' 至 'System.Collections.Generic.List'
【问题讨论】:
-
这个错误没有被完全引用,这不会帮助人们找出你的问题。克里斯托斯已经解决了……他的答案是正确的。