예제 #1
0
        public bool?AddUserBalance(int userId, AddMoney money)
        {
            var user = _userDataManager.GetUserBalance(userId, money.CurrencyId);

            var currency = _userDataManager.GetCurrency(money.CurrencyId);

            var addMoney = new Money(currency, money.Amount);

            var result = user.Balance.AddMoney(addMoney);

            _userDataManager.UpdateUserBalance(user);

            return(result);
        }