Refactor query handling for dynamic customization
Updated `InvokeBatchRecActionsCommandExtensions` to filter actions with `Invoked = false` using a lambda in `ToReadQuery`. Refactored `ReadRecActionQueryBase` to remove the `Invoked` property and updated `ToReadQuery` to accept a delegate for external query modifications. Moved the `Invoked` property to `ReadRecActionQuery` and added a parameterless constructor. These changes improve flexibility and enable dynamic query customization.
This commit is contained in:
@@ -17,7 +17,7 @@ public class InvokeRecActionsCommandHandler(ISender sender, IServiceScopeFactory
|
||||
{
|
||||
public async Task Handle(InvokeBatchRecActionsCommand request, CancellationToken cancel)
|
||||
{
|
||||
var actions = await sender.Send(request.ToReadQuery(), cancel);
|
||||
var actions = await sender.Send(request.ToReadQuery(q => q.Invoked = false), cancel);
|
||||
|
||||
var http = clientFactory.CreateClient();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user