Esempio n. 1
0
        public OrderDetail Find(int id)
        {
            try
            {
                var odb = new OrderDetailBusiness();
                return(odb.GetById(id));
            }
            catch (Exception ex)
            {
                var httpError = new HttpResponseMessage()
                {
                    StatusCode   = (HttpStatusCode)422,
                    ReasonPhrase = ex.Message,
                    Content      = new StringContent(ex.Message),
                };

                throw new HttpResponseException(httpError);
            }
        }
 public OrderDetail GetById(int id)
 {
     return(business.GetById(id));
 }