Well...
First()[
^] method returns the first element in the sequence that passes the test in the specified predicate function. So, this query is not proper:
var query = office.Branch.First().Dept.First().Employee.First().Name
Try something like this:
var query = office.Branch
.Where(x=>x.BranchID == "branch_2")
.Dept
.Where(x=>x.DeptID=="dept_2")
.Employee
.Select(x=>x.Name);
And do not forget to follow the link in solution 1 by
Beginner Luck[
^].