Two sides of equality in a join are considered as two separate lambda expressions that generate keys for two sequences.
from category in categories
join prod in products on category.ID equals prod.CategoryID
categories.Join(products,
category => category.ID,
prod => prod.CategoryID,
(category, prod) => new { Category = category, Product=prod });
Using the keyword equals makes it unimportant when one lambda ends and another begins. For the where clause, on the other hand, there is one lambda expression that determines whether each element matches:
from prod in products
where prod.CategoryID == 1
products.Where( prod => prod.CategoryID == 1 )
Theoretically, unions could be implemented with a single lambda like
from category in categories
join prod in products on category.ID == prod.CategoryID
categories.Join(products,
(category, prod) => category.ID == prod.CategoryID,
(category, prod) => new { Category = category, Product=prod });
, , LINQ - , .