From 5697eb3dd82017b919588d9fdc19245db82ceebd Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 25 Nov 2025 17:10:44 +0100 Subject: [PATCH] Add InvokeRecActionCommandExtensions for ISender Introduce a new static class `InvokeRecActionCommandExtensions` to extend the `ISender` interface with the `InvokeRecAction` method. This method simplifies the invocation of `InvokeRecActionCommand` by allowing callers to pass only the `profileId`, internally creating and sending the command. --- .../RecActions/Commands/InvokeRecActionCommand.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs b/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs index 6fed4da..cd5a4be 100644 --- a/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs +++ b/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs @@ -5,4 +5,10 @@ namespace ReC.Application.RecActions.Commands; public class InvokeRecActionCommand : IRequest { public int ProfileId { get; init; } +} + +public static class InvokeRecActionCommandExtensions +{ + public static Task InvokeRecAction(this ISender sender, int profileId) + => sender.Send(new InvokeRecActionCommand { ProfileId = profileId }); } \ No newline at end of file