Pass CancellationToken to ExecuteDynamicSqlAsync
Updated PreprocessingBehavior to include the CancellationToken when calling ExecuteDynamicSqlAsync, enabling query execution to be cancelled if the operation is aborted.
This commit is contained in:
@@ -13,7 +13,7 @@ public class PreprocessingBehavior(IRecDbContext context, ISender sender) : IPip
|
||||
try
|
||||
{
|
||||
if (request.Action.PreprocessingQuery is string query)
|
||||
await context.ExecuteDynamicSqlAsync(query);
|
||||
await context.ExecuteDynamicSqlAsync(query, cancel);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user