Probably there is some mess in my head, but I see a kind of confusion in the following:
- Web API controllers are derived from the ApiController class, where the main method is ExecuteAsync, which make the request go through the pipe of filters and action, returning Task at the end;
- Web API actions support ability to return object of type Task, utilizing TPL or async/await.
My question is: do I really benefit from constructing and runing tasks within API actions? As far as I understand, the goal to return threads back into ASP.NET threadpool ASAP is already carried out by ApiController.ExecuteAsync infrastructure, therefore additional level of async gives me nothing (except if I need cancellation for task or performing operations in backend in parallel).
Any thoughts? Thanks.