public ActionResult FilterByPrice(decimal minPrice, decimal maxPrice, string view) { List <StoreDomainModel> prcFltrdLstDM = storeBusiness.FilterByPrice(minPrice, maxPrice); List <StoreViewModel> prcFltrdLstVM = new List <StoreViewModel>(); AutoMapper.Mapper.Map(prcFltrdLstDM, prcFltrdLstVM); if (view == "grid") { return(PartialView("_Products", prcFltrdLstVM)); } else { return(PartialView("_ProductsList", prcFltrdLstVM)); } }