Example #1
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            var model = await _pollViewModelService.PrepareHomePagePoll();

            if (!model.Any())
            {
                Content("");
            }
            return(View(model));
        }
Example #2
0
        public IViewComponentResult Invoke()
        {
            var model = _pollViewModelService.PrepareHomePagePoll();

            if (!model.Any())
            {
                Content("");
            }
            return(View(model));
        }