public ICollection <Account> RemoveAccountsFromClient(Client client, ICollection <Account> accounts) { accounts = RemoveNULL <Account> .DelNull(accounts); client.accounts.Except(client.accounts.Intersect(accounts, new AccountComparer())); return(client.accounts); }
public ICollection <Account> AddAccountsToClient(Client client, ICollection <Account> accounts) { client.accounts.Concat(accounts.Except(client.accounts.Intersect(RemoveNULL <Account> .DelNull(accounts), new AccountComparer()))); return(client.accounts); }