In order to make calls to AuthorizeAsync, I am writing my controller in an ASP.NET 5 project as async. There is one method that doesn't need to call AuthorizeAsync, but just for consistency I wrote it as an asynchronous method like:
public Task<IActionResult> ApplicationsWithSmes(bool toPdf = false)
=> Task.Run(() => (IActionResult)View(DataService.GetList<ApplicationWithSmesDto>()));
Now in non-async methods, I am able to just return View() without casting it to IActionResult. Am I doing something wrong in the way I'm writing the method above? If not, why do I have to have the cast?