我有这个查询:
from e in Employee
join t in TimeTable
on e.Id equals t.EmpId
group new {e,t} by e.Id into g
orderby g.Key
select new
{
Emp = g.Key,
Items = g.Select(c => c.t.OtherTable.Somevalue).Distinct()
}
Employees
它工作正常,但我需要反转分组,以便它将全部分组OtherTable.Somevalue
我怎么做?