在连接 2 个表(T2 和 T3)时,我找不到使用“OR”连接第三个表的正确语法 - 在下面的代码中 - 如何在具有 4 个不同列的 t3 表上添加“或等于”?
List<Tuple<Match, Match_Players, Competition>> res = (from t1 in _context.Competitions.AsEnumerable()
join t2 in _context.Match_Players.AsEnumerable() on (t1.Club_Id, t1.Comp_Id) equals (t2.Club_Id, t2.Comp_Id)
join t3 in _context.Matches.AsEnumerable() on (t2.Club_Id, t2.Comp_Id, t2.Team_Id, t2.Match_Id)
equals (t3.Club_Id, t3.Comp_Id, t3.Team_Id_Home, t3.Match_Id)
***or
equals(t3.Club_Id, t3.Comp_Id, t3.Team_Id_away, t3.Match_Id)***
where t1.Club_Id == club_id && t1.Comp_Inactive == false && t2.UserId == player_id && t2.Player_Starter != 2
select new Tuple<Match, Match_Players, Competition>(t3, t2, t1)).ToList();
感谢您的帮助 - 非常感谢