public bool UpdateCheckSumSnapshot(string pChecksum) { var lstSnapshots = new List <Wallet_Snapshot>(); var userLogic = new WalletUserLogic(true); try { var logWallet = new LogWallet(); WalletTransactionUow WalletTransactionUnitOfWork = null; using (WalletTransactionUnitOfWork = new WalletTransactionUow(new WalletEntities())) { lstSnapshots = WalletTransactionUnitOfWork.GetSnapshotByCheckSum(pChecksum); logWallet.Log(MethodBase.GetCurrentMethod(), "Log here 1: " + pChecksum + "|" + lstSnapshots.Count, null, ""); var S1 = ""; foreach (Wallet_Snapshot walletSnapShot in lstSnapshots) { walletSnapShot.Checksum = BuildCheckSum(walletSnapShot); S1 += (walletSnapShot.ID + walletSnapShot.Account_ID + ConvertUtility.RoundToTwoDecimalPlaces(walletSnapShot.Balance) + walletSnapShot.CreateDate.ToString("yyyy-MM-dd HH:mm:ss") + walletSnapShot.Currency_Code + walletSnapShot.Checksum); } logWallet.Log(MethodBase.GetCurrentMethod(), "Log here 2", null, ""); var S1Hash = SecurityLogic.GetSha1Hash(S1); logWallet.Log(MethodBase.GetCurrentMethod(), "Log here 3" + S1Hash, null, ""); foreach (Wallet_Snapshot Wallet_Snapshot in lstSnapshots) { Wallet_Snapshot.Snapshot = S1Hash; } WalletTransactionUnitOfWork.DoUpdateMany(lstSnapshots).EndTransaction(); logWallet.Log(MethodBase.GetCurrentMethod(), "Finish Update UpdateCheckSumSnapshot", null, ""); } return(true); } catch (Exception ex) { var logWallet = new LogWallet(); Task.Factory.StartNew(() => logWallet.Log(MethodBase.GetCurrentMethod(), "", ex, "")); return(false); } }