示例#1
0
        public AllResponse <Order> All()
        {
            try
            {
                var response = new AllResponse <Order>();

                response.Result = orderBusiness.All();
                return(response);
            }
            catch (Exception ex)
            {
                var httpError = new HttpResponseMessage()
                {
                    StatusCode   = (HttpStatusCode)422,
                    ReasonPhrase = ex.Message
                };

                throw new HttpResponseException(httpError);
            }
        }