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