There is this controller file, SecretAuthController.cs
public class SecretAuthController : Controller
{
public ActionResult Auth()
{
//library method whose signature recently changed to async
return ProcessTelemetry();
}
}
So, my colleague changed this code to
public class SecretAuthController : MyBaseController
{
public Async Task<ActionResult> Auth()
{
//library method whose signature recently changed to async
await MyLib.GetTaskDetails(Id);
return ProcessTelemetry();
}
}
In this process, they also changed all other controller methods signature too to use 1async
.
So, some methods look like
public Async Task<ActionResult> ExFooTest()
{
//There is no awaitable call here
//normally returns.
}
Few doubts regarding this:
- If there is no awaitable call, is it wise to change the method signature to use
async
? - Is it a general rule, that if we want to change one action method signature to use
async
, should we need to change all the action method signature ? (Assume they don't await)