Tag Archives: await

The async and await in ASP.NET MVC

The async and await combination allows you to have non-blocking methods.

In ASP.NET MVC you can have asynchronous actions. It might sound a good idea to make all your actions async, but it is not. Light operations like returning a view, handling a post, will likely get slower because the cost of creating a thread will be much higher.

But you can benefit from it by using it against I/O operations.
Continue reading

An overview of async and await

The async and await keywords were introduced on .NET 4.0.

In the past asynchronous operations were achieved by invoking methods and handling callbacks. Or by starting new threads and having to handle them. That way you have to focus on handling the asynchronous operations and it also caused your code to be split all over the place due the callbacks and complex error handling.

The async and await makes it possible so that you can create your code as you would when performing synchronous operations.
Continue reading