private void DeleteTransactionsForAdviser(Adviser adviser) { foreach (var transaction in repository.Transactions.Where(x => x.Adviser.AdviserId == adviser.AdviserId)) { repository.Transactions.Remove(transaction); } }
private void DeleteEntitlementsForAdviser(Adviser adviser) { foreach (var entitlement in repository.Entitlements.Where(x => x.AdviserId == adviser.AdviserId)) { repository.Entitlements.Remove(entitlement); } }
private void DeleteAdvisers(Adviser adviser) { foreach (var a in repository.Advisers.Where(x => x.AdviserId == adviser.AdviserId)) { repository.Advisers.Remove(a); } }
private void DeleteBalancesForAdviser(Adviser adviser) { foreach (var balance in repository.InvestmentBalances.Where(x => x.Adviser.AdviserId == adviser.AdviserId)) { repository.InvestmentBalances.Remove(balance); } }
private void DeleteAccountsForAdviser(Adviser adviser) { foreach (var account in repository.Accounts.Where(x => x.Adviser.AdviserId == adviser.AdviserId)) { repository.Accounts.Remove(account); } }