Пример #1
0
        public async Task <IActionResult> GetAllEmployeesBenefitCosts(int employerId)
        {
            IEnumerable <EmployeeDTO> employees = await _employeesFeature.GetEmployeesByEmployerIdAsync(employerId);

            IEnumerable <EmployeePayroll> employeePayrolls = await _benefitsCalculatorService.CalculateAllEmployeesBenefitsCosts(employees);

            return(Ok(employeePayrolls));
        }
Пример #2
0
        public async Task <IActionResult> GetEmployeesByEmployerIdAsync(int employerId)
        {
            IEnumerable <EmployeeDTO> employees = await _employeeFeature.GetEmployeesByEmployerIdAsync(employerId);

            if (employees == null)
            {
                return(NotFound());
            }

            return(Ok(employees));
        }