Exemplo n.º 1
0
        public KeepNote UpdateNote(int noteId, KeepNote keepNote)
        {
            KeepNote _note = notes.FirstOrDefault(n => n.NoteId == noteId);

            if (_note != null)
            {
                _note.NoteTitle       = keepNote.NoteTitle;
                _note.NoteDescription = keepNote.NoteDescription;
            }
            return(_note);
        }
Exemplo n.º 2
0
        public bool DeleteNote(int noteId)
        {
            KeepNote note = notes.FirstOrDefault(n => n.NoteId == noteId);

            if (note != null)
            {
                notes.Remove(note);
                return(true);
            }
            return(false);
        }
Exemplo n.º 3
0
 public bool AddNote(KeepNote keepNote)
 {
     notes.Add(keepNote);
     return(true);
 }
Exemplo n.º 4
0
        public KeepNote GetNoteById(int noteId)
        {
            KeepNote note = notes.FirstOrDefault(n => n.NoteId == noteId);

            return(note);
        }