I'm not sure what's the correct way of using async actions in MV5.
I don't know which one I should use.
This:
public async Task<ActionResult> Index(CancellationToken ct) { var result = await service.GetData(ct); return View(result); } This:
public async Task<ActionResult> Index(CancellationTokenSource cts) { var result = await service.GetData(cts.Token); return View(result); } Or this:
public async Task<ActionResult> Index() { var cts = CancellationTokenSource.CreateLinkedTokenSource(Request.TimedOutToken, Response.ClientDisconnectedToken); var result = await service.GetData(cts.Token); return View(result); } What are the difference among them?
CancellationTokenorCancellationTokenSourceas a parameter in a ASP.NET MVC action.