public async Task <IHttpActionResult> GetClub(int id) { Club club = ClubBLL.Get(id); if (club == null) { return(NotFound()); } return(Ok(club)); }
public IHttpActionResult Get(int id) { try { Club result = ClubBLL.Get(id); if (result == null) { return(NotFound()); } return(Content(HttpStatusCode.OK, result)); } catch (Exception ex) { return(Content(HttpStatusCode.BadRequest, ex)); } }
// GET: api/Club public IQueryable <Club> GetClubs() { return(ClubBLL.Get()); }