Asynchronous Controller in MVC 5

Other topics

Defination

Using an Asynchronous Controller in ASP.NET MVC. The AsyncController class enables you to write asynchronous action methods. You can use asynchronous action methods for long-running, non-CPU bound requests. This avoids blocking the Web server from performing work while the request is being processed.

Asynchronous Controller

public async Task<actionresult> Index()
{
     return  View("View", await db.UserMasers.ToListAsync());
}

Contributors

Topic Id: 7500

Example Ids: 24749,24750

This site is not affiliated with any of the contributors.