public void RemoveNote() { Book = BookDomain.SetUnchanged(Book); Editing.EntityState = EntityState.Deleted; _bookDomain.UpdateBook(Book); OnNoteChanged(); }
public void SaveNote() { Book = BookDomain.SetUnchanged(_book); Editing.NoteText = _noteText; Editing.EntityState = EntityState.Modified; _bookDomain.UpdateBook(Book); OnNoteChanged(); }
private void AddNote() { Book = BookDomain.SetUnchanged(Book); var note = new Note { Book = Book, NoteText = _noteText, CreatedDateTime = DateTime.Now }; if (PageNumber != null) { note.PageNumber = PageNumber; } note.EntityState = EntityState.Added; Book.Notes.Add(note); _bookDomain.UpdateBook(Book); OnNoteChanged(); }