Exemplo n.º 1
0
        public async Task <IActionResult> Index()
        {
            var model = new IndexViewModel();

            model.MostPopularEvents = await _publicEventService.GetPublicEvents(sortBy : "follows", pageSize : 10);

            model.Categories = await _publicEventService.GetCategories();

            return(View(model));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Index()
        {
            var model = new UserPanelViewModel()
            {
                User       = await _userService.GetUserWithItems(_userId),
                Categories = await _publicEventService.GetCategories()
            };

            return(View(model));
        }