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