Ejemplo n.º 1
0
 /// <summary>
 /// Retrieves the list of values
 /// </summary>
 /// <returns></returns>
 // GET: api/Country
 public HttpResponseMessage GetRoomType()
 {
     try
     {
         var lst = _RoomTypeService.GetAllRoomType();
         if (lst != null)
         {
             return(new HttpResponseMessage()
             {
                 Content = new StringContent(JArray.FromObject(lst).ToString(), Encoding.UTF8, "application/json")
             });
         }
         return(Request.CreateResponse(HttpStatusCode.OK, lst));
     }
     catch (Exception ex)
     {
         throw ex;
         //return new HttpResponseMessage(HttpStatusCode.InternalServerError);
     }
 }