public ActionResult Index() { Thread thread = new Thread(new ThreadStart(AddNews)); thread.Start(); var news = _news.GetAll(); return(View(news)); }
public async Task <ViewResult> Index() { var news = await _newsData.GetAll(); var model = new HomePageViewModel { Messages = news, CurrentGreeting = _greeter.GetGreeting() }; return(View(model)); }