Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public void NewNote(NoteReq noteIn, string email)
        {
            DateTime saveUtcNow = DateTime.UtcNow;
            NoteMod  note       = new NoteMod(saveUtcNow, email, noteIn.Title, noteIn.Note);

            _notes.InsertOne(note);
        }
Ejemplo n.º 3
0
 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
     });
 }
Ejemplo n.º 4
0
 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);
 }