2 回答
TA贡献1847条经验 获得超7个赞
AllotDetail dbdinner join这里是不是错了?
AllotDetail dbd inner join??
var result = ctx.AllotDetail.GroupJoin
(
ctx.OutputRec,
a => a.AllotRecID,
o => o.AllotRectID,
(a, c) =>
new
{
ProductID = a.ProductID,
Weight = c.Sum(s => s.Weight)
});
TA贡献2016条经验 获得超9个赞
大概这么个意思,照着你的sql手写的,写错了就自己改改:
from p in AllotDetail
from q in OutputRec
group p by p.AllotRecID,p.ProductID,p.Weight into g
where g.Weight > weight
select new {
AllotRecID,ProductID,
weight = g.Sum(p => p.Weight)
}
- 2 回答
- 0 关注
- 535 浏览
添加回答
举报