Ejemplo n.º 1
0
 public HttpResponseMessage AddNewReview(REVIEW review)
 {
     try
     {
         var commonService = new CommonService();
         var id = commonService.AddNewReview(review);
         var response = Request.CreateResponse(HttpStatusCode.OK, id);
         return response;
     }
     catch (Exception e)
     {
         var error = Request.CreateResponse(HttpStatusCode.InternalServerError, e.Message);
         return error;
     }
 }
Ejemplo n.º 2
0
 public HttpResponseMessage GetAllCategories(bool isService)
 {
     try
     {
         var commonService = new CommonService();
         var categories = commonService.GetAllCategories(isService);
         var response = Request.CreateResponse(HttpStatusCode.OK, categories);
         return response;
     }
     catch (Exception e)
     {
         var error = Request.CreateResponse(HttpStatusCode.InternalServerError, e.Message);
         return error;
     }
 }