Ejemplo n.º 1
0
		private byte[] GetImageData(BookDto bookDto)
		{
			var srcFolder = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory).Parent.Parent;
			var dataImporterRoot = srcFolder.GetDirectories("utils").Single().GetDirectories("DataImporter").Single();
			var imageDir = new DirectoryInfo(Path.Combine(dataImporterRoot.FullName, "Images"));

			return File.ReadAllBytes(Path.Combine(imageDir.FullName, bookDto.ImageName).Replace(@"Growing Object-Oriented Software, Guided by Tests7b57d8a8-c82e-4cc7-b38c-9f31f47a1f32.jpg", "GOOS.jpg"));

		}
Ejemplo n.º 2
0
		private string GetGenreName(IEnumerable<GenreDto> genreDtos, BookDto dto)
		{
			var genreName = genreDtos.ToList().Single(dt => dt.Id == dto.Genre_Id).Name;

			return genreName;
		}