public IActionResult Get() { IEnumerable <StewardessDto> stewardessDtos; try { stewardessDtos = stewardessService.GetAll(); } catch (Exception ex) { return(BadRequest(new { ErrorType = ex.GetType().Name, ex.Message })); } return(Ok(stewardessDtos)); }
public async Task <IActionResult> GetAll() { return(Json(await _service.GetAll())); }
public async Task <IActionResult> Get() { return(Ok(await service.GetAll())); }
public IActionResult Get() { return(Ok(service.GetAll())); }
public async Task <ActionResult> Get() { var results = await _stewardessService.GetAll(); return(Ok(results)); }