public IActionResult Get() { try { return(Ok(service.Get())); } catch (Exception ex) { return(NotFound(ex)); } }
public async Task <IActionResult> Get() { try { return(Ok(await service.Get())); } catch (Exception ex) { return(NotFound(ex)); } }
public async Task <IActionResult> GetOrder(Guid id) { var order = await _planeService.Get(id); if (order == null) { return(NotFound("Plane was not found")); } return(Ok(order)); }
public async Task <IActionResult> GetById(int id) { return(Json(await _service.Get(id))); }
public IActionResult Get() { var planes = planeService.Get(); return(Ok(planes)); }