public async Task <IActionResult> Get() { try { return(Ok(await _context.SelectEmployees())); } catch (Exception e) { return(BadRequest(e.Message)); } }
public async Task <IEnumerable <Operation <Paycheck> > > GeneratePaycheck(List <Guid> employeesIds, DateTime referenceMonth) { var employees = await _employeeContext.SelectEmployees(employeesIds); var result = new List <Operation <Paycheck> >(); foreach (var employee in employees) { result.Add(await _paycheckService.CreatePaycheck(employee, referenceMonth)); } return(result); }