Esempio n. 1
0
 public decimal GetMoneyOfWithdrawed(long userId)
 {
     return(WalletRecordRepository.GetAll().Where(model => model.Type == WalletRecordType.Withdraw &&
                                                  model.FetchStatus == FetchStatus.Success &&
                                                  model.UserId == userId
                                                  ).Sum(od => ((decimal?)od.Money)).GetValueOrDefault());
 }
Esempio n. 2
0
 public decimal GetMoneyOfRecharge(long userId)
 {
     return(WalletRecordRepository.GetAll().Where(model => model.Type == WalletRecordType.Recharge &&
                                                  model.UserId == userId).Sum(od => ((decimal?)od.Money)).GetValueOrDefault());
 }