Beispiel #1
0
 public HttpResponseMessage AddProductToCart(CART product)
 {
     try
     {
         var cartService = new CartService();
         var id          = cartService.AddProductInCart(product);
         var response    = Request.CreateResponse(HttpStatusCode.OK, id);
         return(response);
     }
     catch (Exception e)
     {
         var error = Request.CreateResponse(HttpStatusCode.InternalServerError, e.Message);
         return(error);
     }
 }