请查看我的Linq查询并提出修复建议。第二次加入是错误的。
var result = (from e in _DB_Goal_Allocation.Employees.Where(x => x.Active == 1 && x.Branch_Number == ddlBranch)
join j in _DB_Goal_Allocation.Employees_JobTitleGroupLOBs.Where(y => Job_Group.Contains(y.JobGroup)) on e.Title equals j.JobTitle
join g in _DB_Goal_Allocation.Goal_Allocation_Employees.Where(ga => ga.Year == ddlYear)
on new{ e.Branch_Number, e.EmployeeID } equals new { Branch_Number = g.BranchNumber, EmployeeID = g.EmployeeID } into emp
from t in emp.DefaultIfEmpty()
select e.FirstName + " " + e.LastName as EmployeeName).ToList();