Esempio n. 1
0
        public IViewComponentResult Invoke()
        {
            if (!_blogSettings.Enabled)
            {
                return(Content(""));
            }

            var model = _blogViewModelService.PrepareBlogPostYearModel();

            return(View(model));
        }
        public async Task <IViewComponentResult> InvokeAsync()
        {
            if (!_blogSettings.Enabled)
            {
                return(Content(""));
            }

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

            return(View(model));
        }