Esempio n. 1
0
        public async Task <int> Handle(CreateProductCatalogCommand request, CancellationToken cancellationToken)
        {
            var productCatalogId = await _productCatalogRepository.CreateProductCatalogAsync(request, cancellationToken);

            await _mediator.Publish(new ProductCatalogCreated()
            {
                ProductCategoryId = productCatalogId
            }, cancellationToken);

            return(productCatalogId);
        }