From 2c81583831b034136c8c0b7b8143cd800063bf11 Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 9 Feb 2026 12:52:29 +0100 Subject: [PATCH] Update CreateCommandHandler to return created entity Changed CreateCommandHandler to implement IRequestHandler and updated method signatures to return the created entity. Adjusted generic constraints to require TCommand to implement IRequest. --- .../Common/Commands/CreateCommandHandler.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/EnvelopeGenerator.Application/Common/Commands/CreateCommandHandler.cs b/EnvelopeGenerator.Application/Common/Commands/CreateCommandHandler.cs index c1dd19a8..acf0366e 100644 --- a/EnvelopeGenerator.Application/Common/Commands/CreateCommandHandler.cs +++ b/EnvelopeGenerator.Application/Common/Commands/CreateCommandHandler.cs @@ -8,8 +8,8 @@ namespace EnvelopeGenerator.Application.Common.Commands; /// /// /// -public class CreateCommandHandler : IRequestHandler - where TCommand : class, IRequest +public class CreateCommandHandler : IRequestHandler + where TCommand : class, IRequest where TEntity : class { /// @@ -32,5 +32,5 @@ public class CreateCommandHandler : IRequestHandler /// /// /// - public Task Handle(TCommand request, CancellationToken cancel) => Repository.CreateAsync(request, cancel); + public Task Handle(TCommand request, CancellationToken cancel) => Repository.CreateAsync(request, cancel); } \ No newline at end of file