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; } }
public void AddPing(Ping ping) { try { _context.Add(ping); } catch (Exception ex) { _logger.LogError("Could not add new ping to the database.", ex); throw; } }