Exemplo n.º 1
0
        public PartialViewResult FormProductDetail(int id)
        {
            var product    = productService.FindById(id);
            var ProductDTO = AutoMapper.Mapper.Map <ProductDTO>(product);

            ViewBag.Data  = ProductDTO;
            ViewBag.Size  = AutoMapper.Mapper.Map <IEnumerable <SizeDTO> >(sizeService.FindAll());
            ViewBag.Color = AutoMapper.Mapper.Map <IEnumerable <ColorDTO> >(colorService.FindAll());
            return(PartialView());
        }