예제 #1
0
        public IActionResult ExperienceList(int[] filterCategoryIds, int page = 1)
        {
            const int pageSize = 6;

            var experiencesToDisplay = _ExperienceService.ExperienceListByFilters(filterCategoryIds, "", "", page, pageSize);

            var totalNumberOfItemsToDisplay = _ExperienceService.GetFilteredExperienceCount(filterCategoryIds, "", "");

            var experienceListModel = new ExperienceListModel()
            {
                Experiences       = experiencesToDisplay,
                AllCategories     = _CategoryService.GetAll(),
                FilterCategoryIds = filterCategoryIds,

                PageInfo = new PageInfo()
                {
                    CurrentPage       = page,
                    ItemsPerPage      = pageSize,
                    TotalItems        = totalNumberOfItemsToDisplay,
                    filterCategoryIds = filterCategoryIds
                }
            };


            return(View(experienceListModel));
        }