Is there any scenario where writing method like this:
public async Task DoSomethingAsync()
{
// Some synchronous code
The only reason you'd want to do it is if there is some other await
in the earlier code, or if you're in some way manipulating the result before returning it. Another way in which that might be happening is through a try/catch
that changes how exceptions are handled. If you aren't doing any of that then you're right, there's no reason to add the overhead of making the method async
.