Exemplo n.º 1
0
        public Order Add(Order order)
        {
            try
            {
                var bc = new OrderBusiness();
                return(bc.AgregarOrder(order));
            }
            catch (Exception ex)
            {
                var httpError = new HttpResponseMessage()
                {
                    StatusCode   = (HttpStatusCode)422,
                    ReasonPhrase = ex.Message
                };

                throw new HttpResponseException(httpError);
            }
        }