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; } }
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; } }