Пример #1
0
        public IViewComponentResult Invoke()
        {
            if (!_blogSettings.Enabled)
            {
                return(Content(""));
            }

            var model = _blogViewModelService.PrepareBlogPostTagListModel();

            return(View(model));
        }
Пример #2
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            if (!_blogSettings.Enabled)
            {
                return(Content(""));
            }

            var model = await Task.Run(() => _blogViewModelService.PrepareBlogPostTagListModel());

            return(View(model));
        }