LINQ Join with Multiple Conditions in On Clause

前端 未结 4 785
小鲜肉
小鲜肉 2020-11-28 05:25

I\'m trying to implement a query in LINQ that uses a left outer join with multiple conditions in the ON clause.

I\'ll use the example of the following two tables

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-28 05:33

    You can't do it like that. The join clause (and the Join() extension method) supports only equijoins. That's also the reason, why it uses equals and not ==. And even if you could do something like that, it wouldn't work, because join is an inner join, not outer join.

提交回复
热议问题