Exemplo n.º 1
0
        public async Task <Unit> Handle(DeleteProductCatalogCommand request, CancellationToken cancellationToken)
        {
            await _productCatalogRepository.DeleteProductCatalogAsync(request, cancellationToken);

            await _mediator.Publish(new ProductCatalogDeleted()
            {
                ProductCatalogId = request.Id
            }, cancellationToken);

            return(Unit.Value);
        }