Scenario:
Employee: EmployeeId (PK) DepartmentId_FK (FK) Name and other fields
Department: DepartmentId (PK) CompanyId_FK (FK) Name and other fields
Company: CompanyId (PK) Name and other fields
How can I build a linq query that can join the three tables and returns EmployeeName, DepartmentName and CompanyName?
the following syntax does not work because there is no Navigation Property names Company on Employee.cs.
var model = DataContext.Employee
.Include("Employer")
.Include("Company");
What is the correct way to do this?