示例#1
0
		public Book(TranslatedBook translatedBook, IEnumerable<string> cultures) : this()
		{
			Id = translatedBook.Id;
			Author = translatedBook.Author;
			foreach (var culture in cultures)
			{
				Translations.Add(new BookTranslation
				{
					Culture = culture,
					BookId = translatedBook.Id,
					Title = translatedBook.Title,
					Description = translatedBook.Description,
					PublishDate = translatedBook.PublishDate,
					ISBN10 = translatedBook.ISBN10,
					ISBN13 = translatedBook.ISBN13,
					Publisher = translatedBook.Publisher,
					PagesCount = translatedBook.PagesCount,
					FormatType = translatedBook.FormatType,
					CoverImage = translatedBook.CoverImage,
					AmazonUrl = translatedBook.AmazonUrl,
					Tags = translatedBook.Tags,
				});
			}
		}
示例#2
0
		public Book(TranslatedBook translatedBook, string culture) : this(translatedBook, new[] { culture }) { }