Example #1
0
        public void Edit(CartItem cartItem)
        {
            try
            {
                var cib = new CartItemBusiness();
                cib.Edit(cartItem);
            }
            catch (Exception ex)
            {
                // Repack to Http error.
                var httpError = new HttpResponseMessage()
                {
                    StatusCode = (HttpStatusCode)422,
                    Content    = new StringContent(ex.Message),
                };

                throw new HttpResponseException(httpError);
            }
        }
Example #2
0
        public void Edit(CartItem cartItem)
        {
            try
            {
                var bc = new CartItemBusiness();
                cartItem.ChangedOn = System.DateTime.Now;
                bc.Edit(cartItem);
            }
            catch (Exception ex)
            {
                var httpError = new HttpResponseMessage()
                {
                    StatusCode   = (HttpStatusCode)422,
                    ReasonPhrase = ex.Message
                };

                throw new HttpResponseException(httpError);
            }
        }
 public void Edit(CartItem cartItem)
 {
     business.Edit(cartItem);
 }