public async Task <IViewComponentResult> InvokeAsync() { if (!_newsSettings.Enabled || !_newsSettings.ShowNewsOnMainPage) { return(Content("")); } var model = await _newsModelFactory.PrepareHomepageNewsItemsModelAsync(); return(View(model)); }
public async Task <IViewComponentResult> InvokeAsync() { if (!_newsSettings.Enabled || !_newsSettings.ShowNewsOnMainPage) { return(Content("")); } var model = await _newsModelFactory.PrepareHomepageNewsItemsModelAsync(); return(View(model)); }