Ejemplo n.º 1
0
        public async Task <ActionResult <List <EmployeeViewModel> > > GetEmployeesAsync()
        {
            try
            {
                var employees = await _logic.GetAllAsync();

                if (employees == null)
                {
                    return(NotFound());
                }
                return(employees);
            }
            catch (Exception e)
            {
                return(StatusCode(500, e));
            }
        }
Ejemplo n.º 2
0
 private static async Task <int?> GetCount()
 {
     return((await _employeeLogic.GetAllAsync())?.Count);
 }
Ejemplo n.º 3
0
 public async Task <IEnumerable <EmployeeDto> > GetAllAsync()
 {
     return(await _employeeLogic.GetAllAsync());
 }