public WheelOfFortuneViewModel GenerateNewRoll()
        {
            var wheelFortuneViewModel = new WheelOfFortuneViewModel();
            var registerCommand       = _mapper.Map <RegisterNewRoundCommand>(wheelFortuneViewModel);

            Bus.SendCommand(registerCommand);
            return(_mapper.Map <WheelOfFortuneViewModel>(_repository.GetById(wheelFortuneViewModel.Id)));
        }
예제 #2
0
        public async Task Handle(BuyRegisterSagaCommand message)
        {
            Data.BankId        = message.BankId;
            Data.AccountNumber = message.AccountNumber;
            Data.BuyDate       = message.BuyDate;
            Data.BuyValue      = message.BuyValue;

            var command = new BuyRegisterNewCommand(message.AggregateId, message.SupplierName, message.BuyDate, message.BuyValue,
                                                    message.BankId, message.AccountNumber, message.ManagementCategoryId, message.PurchasedHeads);
            await _bus.SendCommand(command);

            await VerifyProcess();
        }
예제 #3
0
        public DiceViewModel Roll()
        {
            var diceViewModel   = new DiceViewModel();
            var registerCommand = _mapper.Map <RegisterNewRollCommand>(diceViewModel);

            Bus.SendCommand(registerCommand);
            return(_mapper.Map <DiceViewModel>(_repository.GetById(diceViewModel.Id)));
        }
예제 #4
0
 protected async Task NotifyError(string code, string message)
 {
     await _bus.SendCommand(new DomainNotification(code, message));
 }
예제 #5
0
 public async Task CreateNewBankAccount(CreateBankAccountRequest request)
 {
     var command = new CreateNewBankAccountCommand(request.BankId,
                                                   request.AccountNumber, request.CustomerName, request.InitialBalance);
     await _bus.SendCommand(command);
 }
예제 #6
0
 public async Task CreateNewDailyExtractLot(CreateDailyExtractLotRequest request)
 {
     var command = new CreateNewDailyExtractLotCommand(request.Name, request.ManagementCategoryId, request.HeadsAmount);
     await _bus.SendCommand(command);
 }