public async Task <IActionResult> GetAll() { try { return(Ok(await _IEmployeeLogic.GetAll())); } catch (Exception ex) { return(BadRequest(ex)); } }
public async Task <ActionResult <RSV_Global <List <Employee> > > > GetAll() { RSV_Global <List <Employee> > infoResult = new RSV_Global <List <Employee> >(); try { infoResult = await _employeeBL.GetAll(); if (infoResult == null) { return(BadRequest(new { message = "error" })); } return(Ok(infoResult)); } catch (Exception ex) { infoResult.Error = new Error(ex, $"Se presento un error en el metodo {((MethodInfo)MethodBase.GetCurrentMethod()).Name.ToString()}. {ex.Message}"); infoResult.Success = false; } return(infoResult); }
public IEnumerable <EmployeeDto> GetAll() { return(_employeeBL.GetAll()); }