Help Understanding Enumerable.Join Method

前端 未结 4 698
时光取名叫无心
时光取名叫无心 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:22

    The join syntax is

    FirstTable.Join(SecondTable, FirstTableKeyExtractor, SecondTableKeyExtractor, Selector)
    

    So you have two tables. You have some key that is common to both tables. You provide two key extractors that know how to get the key out of each row in the table.

    The join logic identifies pairs of rows, one from each table, that have the same key.

    Each of those rows is then run through the selector to project the result.

    Does that answer your question?

提交回复
热议问题