Beispiel #1
0
 public HttpResponseMessage <List <Statistic> > GetStats()
 {
     try
     {
         return(new HttpResponseMessage <List <Statistic> >(landRepository.GetStats())
         {
             StatusCode = HttpStatusCode.OK
         });
     }
     catch (Exception ex)
     {
         return(new HttpResponseMessage <List <Statistic> >(null)
         {
             StatusCode = HttpStatusCode.InternalServerError, ReasonPhrase = ex.Message
         });
     }
 }