private void LoadCategoriesCallback(ServiceLoadResult<Category> result)
 {
     if (result.Error != null)
     {
         // handle error
     }
     else if (!result.Cancelled)
     {
         this.Categories = result.Entities;
         this.SelectedCategory = Categories.FirstOrDefault();
         LoadBooksByCategory();
     }
 }
        private void LoadBooksCallback(ServiceLoadResult<Book> result)
        {
            if (result.Error != null)
            {
                // handle error
            }
            else if (!result.Cancelled)
            {
                if (Books == null)
                {
                    Books = result.Entities as ICollection<Book>;
                }
                else
                {
                    foreach (var book in result.Entities)
                    {
                        Books.Add(book);
                    }
                }

                SelectedBook = Books.FirstOrDefault();
            }
        }
 private void LoadBooksOfTheDayCallback(ServiceLoadResult<BookOfDay> result)
 {
     if (result.Error != null)
     {
         // handle error
     }
     else if (!result.Cancelled)
     {
         this.BooksOfTheDay = result.Entities;
     }
 }
 private void GetCheckoutsCallback(ServiceLoadResult<Checkout> result)
 {
     if (result.Error != null)
     {
         // handle error
     }
     else if (!result.Cancelled)
     {
         this.Checkouts = result.Entities;
         this.SelectedCheckout = this.Checkouts.FirstOrDefault();
     }
 }