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