Beispiel #1
0
        public HttpResponseMessage GetAll()
        {
            ItemsResponse <ErrorLog> response = new ItemsResponse <ErrorLog>();

            response.Items = _errorLogService.SelectAll();

            return(Request.CreateResponse(HttpStatusCode.OK, response));
        }
 public HttpResponseMessage GetAll()
 {
     try
     {
         IEnumerable <ErrorLog> errorLogs = _errorLogService.SelectAll();
         return(Request.CreateResponse(HttpStatusCode.OK, errorLogs));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex.Message));
     }
 }