Ejemplo n.º 1
0
        protected async Task PublishEntityEventsAsync(IEventProducer eventProducer)
        {
            foreach (DomainEvent domainEvent in eventProducer.GetEvents())
            {
                _logger.LogInformation("Evento de domínio publicado: {domainEvent}", domainEvent);

                await _mediator.Publish(domainEvent);
            }
        }