Пример #1
0
 public HttpResponseMessage ObtainGames()
 {
     try
     {
         var listGames = GamesRepository.ConsultGames();
         return(Request.CreateResponse(HttpStatusCode.OK, listGames));
     }
     catch (Exception e)
     {
         Console.WriteLine($"An Exception has been caught: {e.Message}");
         return(Request.CreateResponse(HttpStatusCode.InternalServerError));
     }
 }