Help Understanding Enumerable.Join Method

前端 未结 4 696
时光取名叫无心
时光取名叫无心 2021-02-04 11:45

Yesterday I posted this question regarding using lambdas inside of a Join() method to check if 2 conditions exist across 2 entities. I received an answer on the question, which

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-04 12:03

    This query is saying join TableA to TableB where TableA.someFieldID == TableB.someFieldID and selecting the results from TableA and seeing if there are any results at all

    In terms of SQL think of it like this, even if it's not Linq-to-SQL...if you are familiar with SQL maybe this makes more sense:

    Select Count(*)
    From TableA a
         Join TableB b
           On a.someFieldID = b.someFieldID
    

    Then checking if Count(*) is > 0

提交回复
热议问题