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); }