private void LoadDepartments() { Departments.Clear(); foreach (var department in db.GetDepartments()) { var departmentView = new DepartmentView() { Department = department, Head = Instructors.FirstOrDefault(instructor => instructor.Id == department.HeadInstructorId) }; Departments.Add(departmentView); } }