We are using Entity Framework in my project. In one of the requirement I need to query data from multiple tables using left outer joins along with conditions. Here is the SQL script. Can someone provide the lambda expression for this?
SELECT
e.EmployeeId, e.EmployeeFirstName, e.EmployeeLastName,
s.SkillId, s.SkillName,
c.CertificateId, c.CertificateName, c.ExpiryDate
FROM
[dbo].[Employee] AS e
LEFT OUTER JOIN
[dbo].[EmployeeSkill] AS s ON e.EmployeeId = s.EmployeeId
AND s.IsActiveSkill = 1
LEFT OUTER JOIN
[dbo].[EmployeeCertification] AS c ON e.EmployeeId = c.EmployeeId
AND c.IsActiveCertification = 1
AND c.ExpiryDate < GETUTCDATE() + 30
WHERE
e.DepartmentId = 1
AND e.IsActiveEmployee = 1