Example #1
0
        private static void MapBookProperties(dynamic bookOrAudioBook, BookDto bookDto)
        {
            bookDto.AuthorName = bookOrAudioBook.Author.Name;
            bookDto.Language = bookOrAudioBook.Language;

            if (!String.IsNullOrEmpty(bookOrAudioBook.SeriesTitle))
            {
                bookDto.Series = new BookSeriesDto
                {
                    Title = bookOrAudioBook.SeriesTitle,
                    SequenceNo = bookOrAudioBook.SeriesNumber
                };
            }
        }
Example #2
0
        private static DocumentDto Map(Book book)
        {
            var bookDto = new BookDto();

            bookDto.Classification = book.ClassificationNr;
            MapBookProperties(book, bookDto);

            return bookDto;
        }