Пример #1
0
        public async Task <IActionResult> Index()
        {
            var page    = 0;
            var tattoos = await _tattooService.GetTopTattoos(page, ItemsPerPage);

            var profiles = await _profileService.GetTopProfiles(page, ItemsPerPage);

            var viewModel = _homeViewModelService.GetHomeIndexViewModel(profiles, tattoos);

            return(View(viewModel));
        }
Пример #2
0
 public async Task <IActionResult> Index(HomeIndexViewModel vm, int page = 1)
 {
     return(View(await _homeViewModelService.GetHomeIndexViewModel(vm.CategoryId, vm.AuthorId, page, Constants.ITEMS_PER_PAGE)));
 }