答案 0 :(得分:1)
var result = (from a in ctx.TableA
join b in ctx.TableB on a.Id equals b.Id
group a by a.Name into g
select new
{
Name = g.Key,
Sum = g.Sum(i => i.Total)
}).ToList();