Exemplo n.º 1
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            if (!_newsSettings.Enabled || !_newsSettings.ShowNewsOnMainPage)
            {
                return(Content(""));
            }

            var model = await _newsModelFactory.PrepareHomepageNewsItemsModelAsync();

            return(View(model));
        }