Beispiel #1
0
        public static void FillContents(IBookStorage bookStorage, BookViewModel book)
        {
            var pages = PageFacade.FindByBookId(book.ID).OrderBy(p => p.PageIndex);

            bookStorage.AccessDispatcherObject(() => book.ClearContents());

            bookStorage.AccessDispatcherObject(() =>
            {
                foreach (var page in pages)
                {
                    book.AddPage(page);
                }
            });
        }