public IActionResult Get() { try { return(Ok(service.Get())); } catch (Exception ex) { return(NotFound(ex)); } }
public IActionResult Get(Guid id) { StewardessDto stewardessDto; try { stewardessDto = stewardessService.Get(id); } catch (Exception ex) { return(BadRequest(new { ErrorType = ex.GetType().Name, ex.Message })); } return(Ok(stewardessDto)); }
public async Task <IActionResult> GetById(int id) { return(Json(await _service.Get(id))); }
public IEnumerable <Stewardess> Get() { return(service.Get()); }