diff --git a/EnvelopeGenerator.Application/Common/Commands/CreateCommandHandler.cs b/EnvelopeGenerator.Application/Common/Commands/CreateCommandHandler.cs new file mode 100644 index 00000000..c1dd19a8 --- /dev/null +++ b/EnvelopeGenerator.Application/Common/Commands/CreateCommandHandler.cs @@ -0,0 +1,36 @@ +using DigitalData.Core.Abstraction.Application.Repository; +using MediatR; + +namespace EnvelopeGenerator.Application.Common.Commands; + +/// +/// +/// +/// +/// +public class CreateCommandHandler : IRequestHandler + where TCommand : class, IRequest + where TEntity : class +{ + /// + /// + /// + protected readonly IRepository Repository; + + /// + /// + /// + /// + public CreateCommandHandler(IRepository repository) + { + Repository = repository; + } + + /// + /// + /// + /// + /// + /// + public Task Handle(TCommand request, CancellationToken cancel) => Repository.CreateAsync(request, cancel); +} \ No newline at end of file