diff --git a/src/ReC.Application/OutResults/Commands/DeleteOutResCommand.cs b/src/ReC.Application/OutResults/Commands/DeleteOutResCommand.cs index 9d56077..14f0911 100644 --- a/src/ReC.Application/OutResults/Commands/DeleteOutResCommand.cs +++ b/src/ReC.Application/OutResults/Commands/DeleteOutResCommand.cs @@ -1,4 +1,6 @@ -using MediatR; +using DigitalData.Core.Abstraction.Application.Repository; +using MediatR; +using ReC.Domain.Entities; namespace ReC.Application.OutResults.Commands; @@ -8,3 +10,11 @@ public record DeleteOutResCommand : IRequest public long? ProfileId { get; init; } } + +public class DeleteOutResCommandHandler(IRepository repo) : IRequestHandler +{ + public Task Handle(DeleteOutResCommand request, CancellationToken cancel) + { + return repo.DeleteAsync(x => x.ActionId == request.ActionId || x.Action!.ProfileId == request.ProfileId, cancel); + } +} \ No newline at end of file