Exemple #1
0
        private void TryUpdateBook(IUnitOfWork uow, int seriesID, List <Book> oldBooks, BookUpdate newBook)
        {
            var oldBook = oldBooks.SingleOrDefault(c => c.SourceItemID == newBook.SourceItemID);

            if (oldBook == null)
            {
                AddNewBook(uow, seriesID, newBook);
            }
            else
            {
                UpdateBook(oldBook, newBook);
            }
        }