예제 #1
0
        public async Task <CarManufactureChanged> Handle(RequestChangeCarManufacture request, CancellationToken cancellationToken)
        {
            var result = await _carModel.ChangeCarManufacture(request);

            var evt = CarManufactureChanged.From(result);
            await _mediator.Publish(AggregateEvent.Create <RequestChangeCarManufacture>(evt.AggregateId, evt, request));

            await _mediator.Publish(evt);

            return(evt);
        }