Help Understanding Enumerable.Join Method
- by lush
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 worked perfectly. I thought after reading the MSDN article on the Enumerable.Join() method, I'd understand exactly what was happening, but I don't. Could someone help me understand what's going on in the below code (the Join() method specifically)? Thanks in advance.
if (db.TableA.Where( a => a.UserID == currentUser )
.Join( db.TableB.Where( b => b.MyField == someValue ),
o => o.someFieldID,
i => i.someFieldID,
(o,i) => o )
.Any())
{
//...
}