Esempio n. 1
0
        public async Task <IHttpActionResult> GetClub(int id)
        {
            Club club = ClubBLL.Get(id);

            if (club == null)
            {
                return(NotFound());
            }

            return(Ok(club));
        }
Esempio n. 2
0
 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));
     }
 }
Esempio n. 3
0
 // GET: api/Club
 public IQueryable <Club> GetClubs()
 {
     return(ClubBLL.Get());
 }