Exemplo n.º 1
0
        public long Create(Book book)
        {
            long pulledDownNumber = 0;
            var  bookValidator    = new BookValidator(book);

            book.PulledDownNumber = GenerateNextPulledDownNumber();

            if (bookValidator.IsValid())
            {
                _bookRepository.Create(book);
                pulledDownNumber = book.PulledDownNumber;
            }

            return(pulledDownNumber);
        }