var query = from et in _unitOfWork.Repository().Table
join bra in _unitOfWork.Repository().Table
on et.BranchCode equals bra.BranchCode
into temp1
from b in temp1.DefaultIfEmpty()
join emp in _unitOfWork.Repository().Table
on et.EmpCode equals emp.EmpCode
into temp2
from e in temp2.DefaultIfEmpty()
where et.EtYear == searchCriterria.Year && et.EtMonth == searchCriterria.Month
&& et.TargetModuleId == searchCriterria.MId && et.BranchCode == searchCriterria.BranchCode
orderby et.EmpCode ascending
select new
{
et.EtId,
et.EtYear,
et.EtMonth,
et.EtTargetValue,
et.TargetModuleId,
et.BranchCode,
b.BranchName,
et.EmpCode,
e.EmpSaleCode,
e.EmpName,
e.PostName
};
v