// GET: api/Employees public IEnumerable <Employee> Get() { var employees = _employeeGateway.GetAll(); foreach (Employee employee in employees) { employee.Department = _departmentGateway.GetById(employee.DepartmentId); employee.Designation = _designationGateway.GetById(employee.DesignationId); } return(employees); }