public override IActionResult Index()
        {
            var model = new InfinityScrollListModel
            {
                Items               = GetBlockItems(),
                ItemViewName        = ItemViewName,
                InfinityScrollModel = new InfinityScrollModel {
                    Url = Url.Action("InfinateScroll"), Params = new List <string>()
                }
            };

            return(View(model));
        }
Exemple #2
0
        public IActionResult Index(int shopId)
        {
            var model = new InfinityScrollListModel
            {
                Items               = GetBlockItems(1, _repository.All.Where(p => p.ShopId == shopId)),
                ItemViewName        = ItemViewName,
                InfinityScrollModel = new InfinityScrollModel
                {
                    Url    = Url.Action("InfinateScroll"),
                    Params = new List <string> {
                        $"\"shopId\":{shopId}"
                    }
                }
            };

            ViewBag.ShopId = shopId;

            return(View(model));
        }