public IActionResult GetById(int id) { var activity = _repo.Get(id); if (activity == null) { return(NotFound("Activity not found")); } return(Ok(activity)); }
// return 404 if not found // return 200 if single record found public IHttpActionResult Get(int id) { var result = _activitiesRepository.Get(id); if (result == null) { return(NotFound()); } return(Ok(result)); }
public IHttpActionResult Get(int id) { return(Ok(_activitiesRepository.Get(id))); }