linq to sql を使用して、フレンド ユーザー フレンド リストにないすべてのユーザーを見つけようとしています。現在、フレンドリストをシステム内のすべてのユーザーと比較しています。linq to sql を使用してこれを行うには、より良い方法が必要です。助けてくれてありがとう
// Comparing this to list to see who does not exist.
// What I would like to do is just use one statement
// to get the list of non friend users
var friends = (from x in db.FriendsLists
where
(x.TheUser == GlobalVariables.User.ID) ||
(x.TheFriend == GlobalVariables.User.ID)
select x).ToList();
var allUsersInSystem = (from x in db.Users select x).ToList();