Example #1
0
        public void Handle(RegisterDeal message)
        {
            DomainEvents.Register <DealSignedDomainEvent>(DealSignedDomainEventHandler);
            DomainEvents.Register <LeadSignedUpEventEvent>(LeadSignedUpDomainEventHandler);
            _correlationId = message.CorrelationId;
            var lead = _leadRepository.GetById(message.LeadId);

            Deal.Register(message.DealId, lead, message.Value);
            _dealRepository.Flush();
            _bus.Return(ReturnCode.OK);
        }