private void DirectCalculateBalance(bool plus, int BaId, decimal inputVal) { var bankAcc = BankAccountHelper.GetById(BaId); if (plus) { bankAcc.Balance += inputVal; } else { bankAcc.Balance -= inputVal; } }
private void UpdateBalanceForBankAccs(List <int> baIds) { foreach (var p in baIds) { var bankAcc = BankAccountHelper.GetById(p); bankAcc.Balance = TransactionHelper.GetSumOfAllTransByBaId(p); DbContext.SaveChanges(); } }