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 }; } }
private static DocumentDto Map(Book book) { var bookDto = new BookDto(); bookDto.Classification = book.ClassificationNr; MapBookProperties(book, bookDto); return bookDto; }