Esempio n. 1
0
 public void Handle(WithdrawMoneyFromAccount message)
 {
     using (repository.StartUnitOfWork())
     {
         repository
         .Get <BankAccount>(BankAccountId.FromAccountNumber(message.AccountNumber))
         .When(message);
     }
 }
Esempio n. 2
0
        public void Handle(ProcessRiskCapture message)
        {
            GreenLogger.Log("Processing risk capture");

            using (repository.StartUnitOfWork())
            {
                var mapId = new MapId();
                var map   = repository.Get <Map>(mapId);
                map.ExtractMapFromRequest(message.Request);

                var captureId = RiskCaptureId.Parse(message.Request.ToXDocument().GetHeader().SequenceId.Value);
                var capture   = repository.Get <RiskCapture>(captureId);
                capture.ExtractCaptureFromRequest(captureId, message.Request, map);
            }
        }