コード例 #1
0
        public async Task <bool> Handle(AddFulanoCommand message, CancellationToken cancellationToken)
        {
            await _fulanoRepository.AddAsync(message.Entity);

            if (await Commit())
            {
                await _mediatorHandler.RaiseDomainEventAsync(new FulanoAddedEvent(message.Entity.Id));
            }

            return(true);
        }