Beispiel #1
0
 public void UpdatePing(Ping ping)
 {
     try
     {
         _context.Pings.Update(ping);
     }
     catch (Exception ex)
     {
         _logger.LogError($"Could not update ping with id {ping.Id} from database.", ex);
         throw;
     }
 }
Beispiel #2
0
 public void AddPing(Ping ping)
 {
     try
     {
         _context.Add(ping);
     }
     catch (Exception ex)
     {
         _logger.LogError("Could not add new ping to the database.", ex);
         throw;
     }
 }