What is the benefit to using await with an async database call

Viewed 8332

I am just looking at the default MVC5 project and how it uses async in the controllers.

I would like to know what benefit async provides here over simply using synchronous calls:

    [HttpPost]
    [ValidateAntiForgeryToken]
    public async Task<ActionResult> Disassociate(string loginProvider, string providerKey)
    {
        ManageMessageId? message = null;

        //why use an async database call here with await instead of just using a synchronous one?
        IdentityResult result = await UserManager.RemoveLoginAsync(User.Identity.GetUserId(), new UserLoginInfo(loginProvider, providerKey));
        if (result.Succeeded)
        {
            message = ManageMessageId.RemoveLoginSuccess;
        }
        else
        {
            message = ManageMessageId.Error;
        }
        return RedirectToAction("Manage", new { Message = message });
    }

What am I missing?

Does this provide some kind of performance benefit in the type of wait that will occur here?

1 Answers
Related