public WheelOfFortuneViewModel GenerateNewRoll() { var wheelFortuneViewModel = new WheelOfFortuneViewModel(); var registerCommand = _mapper.Map <RegisterNewRoundCommand>(wheelFortuneViewModel); Bus.SendCommand(registerCommand); return(_mapper.Map <WheelOfFortuneViewModel>(_repository.GetById(wheelFortuneViewModel.Id))); }
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(); }
public DiceViewModel Roll() { var diceViewModel = new DiceViewModel(); var registerCommand = _mapper.Map <RegisterNewRollCommand>(diceViewModel); Bus.SendCommand(registerCommand); return(_mapper.Map <DiceViewModel>(_repository.GetById(diceViewModel.Id))); }
protected async Task NotifyError(string code, string message) { await _bus.SendCommand(new DomainNotification(code, message)); }
public async Task CreateNewBankAccount(CreateBankAccountRequest request) { var command = new CreateNewBankAccountCommand(request.BankId, request.AccountNumber, request.CustomerName, request.InitialBalance); await _bus.SendCommand(command); }
public async Task CreateNewDailyExtractLot(CreateDailyExtractLotRequest request) { var command = new CreateNewDailyExtractLotCommand(request.Name, request.ManagementCategoryId, request.HeadsAmount); await _bus.SendCommand(command); }