public ActionResult <VenueModel> Get(int id) { var item = _service.GetById(id); if (item == null) { return(NotFound()); } return(Ok(item)); }
public async Task <IActionResult> GetById([FromRoute] int id) { var result = await _venueService.GetById(id); if (result.Status == VenueOperationStatus.DoesNotExists) { return(NotFound()); } return(Ok(result.Result)); }
public IHttpActionResult Get(int id) { var venue = _venueService.GetById(id); if (venue == null) { return(NotFound()); } return(Ok(venue)); }