Exemplo n.º 1
0
        public ProductDetailModel GetById(Guid id)
        {
            var productEntity = productRepository.GetById(id);

            productEntity.Evaluations  = evaluationRepository.GetByProductId(id);
            productEntity.Manufacturer = manufacturerRepository.GetById(productEntity.ManufacturerId);
            productEntity.Category     = categoryRepository.GetById(productEntity.CategoryId);
            return(mapper.Map <ProductDetailModel>(productEntity));
        }