예제 #1
0
        public CartItem Add(CartItem cartItem)
        {
            try
            {
                var bc = new CartItemBusiness();
                return(bc.Add(cartItem));
            }
            catch (Exception ex)
            {
                var httpError = new HttpResponseMessage()
                {
                    StatusCode   = (HttpStatusCode)422,
                    ReasonPhrase = ex.Message
                };

                throw new HttpResponseException(httpError);
            }
        }