public void EditNote(EditNoteReq noteIn, string email) { DateTime saveUtcNow = DateTime.UtcNow; NoteMod note = new NoteMod(noteIn.note_id, saveUtcNow, email, noteIn.Title, noteIn.Note); _notes.ReplaceOne(note => note.Id == noteIn.note_id && note.Email == email, note); }
public void NewNote(NoteReq noteIn, string email) { DateTime saveUtcNow = DateTime.UtcNow; NoteMod note = new NoteMod(saveUtcNow, email, noteIn.Title, noteIn.Note); _notes.InsertOne(note); }
public async Task DeleteNote(NoteMod note) { await _database.Notes.Delete(new DataAccessLevel.Entities.Note() { Id = note.Id, Value = note.Value, Document = note.Document, DocumentId = note.DocumentId }); }
public async Task UpdateNote(NoteMod note) { var noteDB = new DataAccessLevel.Entities.Note() { Id = note.Id, Value = note.Value, DocumentId = note.DocumentId, Document = note.Document }; await _database.Notes.Update(noteDB, note.DocumentId); }