首页 新闻 会员 周边 捐助

以下linq竟然选不出x.TraceTime最大的值

0
悬赏园豆:5 [待解决问题]

var temp = from x in
(from y in TraceNumberList
join z in packageLsit on y.Key equals z.TrackingNo
select new
{
OrderNumber = y.Value,
TraceNumber = y.Key,
TraceTime = z.LastPackageTrace.TraceTime,
Trace = z.LastPackageTrace.Trace
})
group x by x.OrderNumber into g
let xtime = g.Max(x => x.TraceTime)
select g.FirstOrDefault(x => x.TraceTime == xtime);

IT小君的主页 IT小君 | 初学一级 | 园豆:197
提问于:2015-09-02 10:18
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册