コード例 #1
0
 public void RemoveNote()
 {
     Book = BookDomain.SetUnchanged(Book);
     Editing.EntityState = EntityState.Deleted;
     _bookDomain.UpdateBook(Book);
     OnNoteChanged();
 }
コード例 #2
0
 public void SaveNote()
 {
     Book                = BookDomain.SetUnchanged(_book);
     Editing.NoteText    = _noteText;
     Editing.EntityState = EntityState.Modified;
     _bookDomain.UpdateBook(Book);
     OnNoteChanged();
 }
コード例 #3
0
        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();
        }