Esempio n. 1
0
        /// <summary>
        /// Get camp by id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public HttpResponseMessage GetCamp(int id)
        {
            CampDTO campViewModel = Icamp.GetCamp(id);

            if (campViewModel != null)
            {
                return(Request.CreateResponse(HttpStatusCode.OK, campViewModel));
            }
            else
            {
                return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "No camp found with id " + id.ToString()));
            }
        }