コード例 #1
0
 public HttpResponseMessage GetOrder()
 {
     try
     {
         var orders = _repository.GetOrders();
         return(Request.CreateResponse <List <Order> >(HttpStatusCode.OK, orders));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.NotFound, ex));
     }
 }