Ejemplo n.º 1
0
 public HttpResponseMessage GetOrderById(int orderId)
 {
     try
     {
         var order = _repository.GetOrderById(orderId);
         return(Request.CreateResponse <Order>(HttpStatusCode.OK, order));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.NotFound, ex));
     }
 }