/// <summary> /// Reads all departments not assigned to an Employee /// </summary> /// <returns>The returned collection</returns> public IEnumerable DepartmentsNotAssigned() { var allEmployeeIds = EmployeeData.Select(emp => emp.DepartmentId).ToList(); return(DepartmentData.Where(dept => allEmployeeIds.Contains(dept.DepartmentId) == false)); }