I checked the System.Web.Mvc.AsyncController in MVC 4.0, it has the comment \"Provided for backward compatibility with ASP.NET MVC 3.\" does this mean there is a new implementat
Starting from ASP.NET MVC 4, you can now use the System.Web.Mvc.Controller
class as the base class and leverage the TAP (Task-based Asynchronous Pattern):
public async Task<ViewResult> Index() {
return View(await GetThingsAsync());
}
Note that you don't have to use async
and await
keywords which come with C# 5.0 but they make asynchronous programming much, much easier and more maintainable.
Have a look at the following articles: