public OrderDetail Add(OrderDetail orderDetail) { try { var odb = new OrderDetailBusiness(); return(odb.Create(orderDetail)); } catch (Exception ex) { var httpError = new HttpResponseMessage() { StatusCode = (HttpStatusCode)422, ReasonPhrase = ex.Message + "+" + ex.InnerException, Content = new StringContent(ex.Message) }; throw new HttpResponseException(httpError); } }
public OrderDetail Create(OrderDetail orderDetail) { return(business.Create(orderDetail)); }