public ActionResult listSuppelier() { var Suppelier = suppelierService.FindAll(); var SuppelierDTO = AutoMapper.Mapper.Map <ICollection <SuppelierDTO> >(Suppelier); return(PartialView(SuppelierDTO)); }
public PartialViewResult FromCreateUpdate(int id) { var product = productService.FindById(id); var ProductDTO = AutoMapper.Mapper.Map <ProductDTO>(product); ViewBag.Data = ProductDTO; var discount = discountCodeService.FindAll(); ViewBag.discount = AutoMapper.Mapper.Map <IEnumerable <DiscountCodeDTO> >(discount); var category = categoryService.FindAll(); ViewBag.Category = AutoMapper.Mapper.Map <IEnumerable <CategoryDTO> >(category); var supplier = suppelierService.FindAll(); ViewBag.Supplier = AutoMapper.Mapper.Map <IEnumerable <SuppelierDTO> >(supplier); return(PartialView()); }