public ActionResult CashIn(CashInView cash_in_view) { this.FlashInfo("You have cashed in $30.00."); var cash_in = new CashInCommand { player_token = _player_authenticator.get_player_token(), amount = 30 }; _command_bus.send(cash_in); return(RedirectToAction("Index", "AccountHome")); }
public ActionResult CashIn() { var account_view = _query_service.query_for_single <AccountView>( x => x.player_token == _player_authenticator.get_player_token()); var account_information_view = new AccountInformationView(); account_information_view.player_is_logged_in = true; account_information_view.player_name = account_view.name; var cash_in_view = new CashInView() { account_information_view = account_information_view }; return(View(cash_in_view)); }