Is there any benefit executing a function using async Task await over executing in the current thread?
[HttpGet]
[Route("example/{id}")]
public async Task<Example> GetExample(int id)
{
return await exampleService.GetExampleAsync(id);
}
Compared to:
[HttpGet]
[Route("example/{id}")]
public Example GetExample(int id)
{
return exampleService.GetExampleAsync(id).Result;
}