示例#1
0
 public HttpResponseMessage <List <Land> > GetAll(Earthwatcher e, HttpRequestMessage <Earthwatcher> request)
 {
     try
     {
         var landCollection = landRepository.GetAll(e.Id, e.PlayingRegion);
         return(new HttpResponseMessage <List <Land> >(landCollection)
         {
             StatusCode = HttpStatusCode.OK
         });
     }
     catch
     {
         return(new HttpResponseMessage <List <Land> >(null)
         {
             StatusCode = HttpStatusCode.BadRequest
         });
     }
 }