So I have a question about Task and async/await operation.
I have a method like this:
public Task<IActionResult> PostCompleteFormModel(string name, [FromBody]IndicatorFormApi apiModel, Guid participantId, [FromServices] IChallengeCycleService challengeCycleService)
{
return Post(name, apiModel.ToSubmitApi(), participantId, challengeCycleService);
}
in a controller.
And as you can see it is without async/await.
But is it not better to do it like this:
public async Task<IActionResult> PostCompleteFormModel(string name, [FromBody]IndicatorFormApi apiModel, Guid participantId, [FromServices] IChallengeCycleService challengeCycleService)
{
return await Post(name, apiModel.ToSubmitApi(), participantId, challengeCycleService);
}
So with the async/await keywords?
Or doesn't make it a differ?
Thank you