Exemplo n.º 1
0
 public Team ReadTeam(string id)
 {
     try
     {
         var results = TeamCollection.Find(t => t.Id == id);
         return(results.First <Team>());
     }
     catch (TimeoutException e)
     {
         Log.Error("Received time out for reading team => ", e);
         return(null);
     }
     catch (Exception e)
     {
         Log.Error("Failed to read team => ", e);
         return(null);
     }
 }
Exemplo n.º 2
0
 public List <Team> Teams()
 {
     try
     {
         List <Team> teams = TeamCollection.Find(_ => true).ToList();
         return(teams);
     }
     catch (TimeoutException e)
     {
         Log.Error("Received time out for retrieving teams => ", e);
         return(null);
     }
     catch (Exception e)
     {
         Log.Error("Failed to retrieve teams => ", e);
         return(null);
     }
 }