Beispiel #1
0
 public void UpdateNote(Note note)
 {
     try
     {
         _context.Notes.Update(note);
     }
     catch (Exception ex)
     {
         _logger.LogError($"Could not update note with id {note.Id} in the database.", ex);
     }
 }
Beispiel #2
0
 public void AddNote(Note note)
 {
     try
     {
         _context.Add(note);
     }
     catch (Exception ex)
     {
         _logger.LogError("Could not add new note to the database.", ex);
         throw;
     }
 }