Multiple Joins LINQ Query

If you want to have multiple joins in a LINQ query, here is the syntax:

var items =      from emp in Employees

join dept in Departments on emp.DeptId equals dept.DeptId

join customer in Customers on customer.EmpId equals Emp.EmpID

select emp;

The point to note here is that this multiple joins will work only if the join is done “on” same type fields with the “same” name. Otherwise this LINQ query will not compile