Unfortunately the names of these methods make terrible search terms, and I\'ve been unable to find a good resource that explains the difference between these methods--as in
Where
returns a new sequence of items matching the predicate.
Any
returns a Boolean value; there's a version with a predicate (in which case it returns whether or not any items match) and a version without (in which case it returns whether the query-so-far contains any items).
I'm not sure about Exists
- it's not a LINQ standard query operator. If there's a version for the Entity Framework, perhaps it checks for existence based on a key - a sort of specialized form of Any
? (There's an Exists
method in List
which is similar to Any(predicate)
but that predates LINQ.)