verdie-g/StoredProcedureEFCore

Cannot cancel

IlyaTsilikovRAFrame opened this issue · 2 comments

I see IStoredProcBuilder.ExecNonQueryAsync (), etc. without CancellationToken parameter. Ability to cancel is often important.

I think you cancel like that :

var cts = new CancellationTokenSource();
Task t = ctx.LoadStoredProc("").ExecNonQueryAsync();
ctx.Wait(cts.Token);

Is it important to add a CancellationToken to the api ?

I think it's important 'cause such or similar way I can just cancel call awaiting but not a procedure execution itself. But the embedded command cancellation can cancel also a procedure execution.