Open
Description
We often see code like that
public async Task<IActionResult> Get()
{
await Task.Delay(1000);
return View();
}
Is it a good practice to add the CancellationToken parameter to actions when it goes async and pass this parameter to async methods ?
public async Task<IActionResult> Get(int id, CancellationToken cancellationToken)
{
await Task.Delay(1000, cancellationToken);
return View();
}
Metadata
Assignees
Labels
No labels
Activity