我在 linq 中有这样的查询
var result = from item1 in context.ServicePriceInsertData
join item2 in context.GroupMasterInsert
on item1.G_Id equals item2.Group_Id
join item3 in context.EmployeeServices
on item1.Service_Id equals item3.E_ServiceId
into dept
from item4 in dept.DefaultIfEmpty()
select new
{
Service_Name = item1.S_Description,
Group_Name = item2.Group_Name,
ServiceId = item4.E_Id == null ? 1 : item4.E_Id
};
现在我需要按 Service 和 Group_Name 来计算 ServiceId。请帮我?