public List <Department> GetAllDepartments() { List <Department> departments = _departmentRepository.GetAllDepartments(); foreach (Department department in departments) { department.Employees = _employeeController.GetEmployeesByDepartmentId(department.Id); } return(departments); }
public List <Employee> GetEmployeesByDepartmentId(int departmentId) { return(_employeeController.GetEmployeesByDepartmentId(departmentId)); }