示例#1
0
        public ActionResult GetAllProducts(string view)
        {
            List <StoreDomainModel> storeDM = storeBusiness.GetAllProducts();
            List <StoreViewModel>   storeVM = new List <StoreViewModel>();

            AutoMapper.Mapper.Map(storeDM, storeVM);

            if (view == "grid")
            {
                return(PartialView("_Products", storeVM));
            }
            else
            {
                return(PartialView("_ProductsList", storeVM));
            }
        }