public virtual async Task <IActionResult> ActiveDiscussions(string forumId = "", int pageNumber = 1)
        {
            if (!_forumSettings.ForumsEnabled)
            {
                return(RedirectToRoute("HomePage"));
            }
            var model = await _boardsViewModelService.PrepareActiveDiscussions(forumId, pageNumber);

            return(View(model));
        }
Exemple #2
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            var model = await Task.Run(() => _boardsViewModelService.PrepareActiveDiscussions());

            if (model == null)
            {
                return(Content(""));
            }

            return(View(model));
        }
Exemple #3
0
        public IViewComponentResult Invoke()
        {
            var model = _boardsViewModelService.PrepareActiveDiscussions();

            if (model == null)
            {
                return(Content(""));
            }

            return(View(model));
        }