public async Task <IActionResult> GetAllEmployeesBenefitCosts(int employerId) { IEnumerable <EmployeeDTO> employees = await _employeesFeature.GetEmployeesByEmployerIdAsync(employerId); IEnumerable <EmployeePayroll> employeePayrolls = await _benefitsCalculatorService.CalculateAllEmployeesBenefitsCosts(employees); return(Ok(employeePayrolls)); }
public async Task <IActionResult> GetEmployeesByEmployerIdAsync(int employerId) { IEnumerable <EmployeeDTO> employees = await _employeeFeature.GetEmployeesByEmployerIdAsync(employerId); if (employees == null) { return(NotFound()); } return(Ok(employees)); }