ivaylokenov / AspNet.Mvc.TypedRouting

A collection of extension methods providing strongly typed routing and link generation for ASP.NET Core MVC projects.
https://mytestedasp.net/
MIT License
485 stars 36 forks source link

Working with async controller actions generates compiler warning CS4014 #18

Closed justdmitry closed 8 years ago

justdmitry commented 8 years ago

For example I have controller action:

public async Task<IActionResult> DoSomething() { ... }

To redirect to this action, I use code like

return this.RedirectToAction<MyController>(c => c.DoSomething());

Which generates compiler warning:

warning CS4014: Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.

Redirection still works Ok, but this warnings are annoying.

ivaylokenov commented 8 years ago

@justdmitry Thank you. Will upload a fix in the next few days.

ivaylokenov commented 8 years ago

@justdmitry Package with a fix is now uploaded to NuGet.