public CartItem AddCart(CartItem cartItem) { try { var bc = new CartItemBusiness(); return(bc.Create(cartItem)); } catch (Exception ex) { var httpError = new HttpResponseMessage() { StatusCode = (HttpStatusCode)422, ReasonPhrase = ex.Message + "+" + ex.InnerException }; throw new HttpResponseException(httpError); } }
public CartItem AddCart(CartItem cartItem) { try { var cib = new CartItemBusiness(); return(cib.Create(cartItem)); } catch (Exception ex) { var httpError = new HttpResponseMessage() { StatusCode = (HttpStatusCode)422, Content = new StringContent(ex.Message + "+" + ex.InnerException), }; throw new HttpResponseException(httpError); } }
public CartItem Create(CartItem cartItem) { return(business.Create(cartItem)); }