The LINQ queries you’ve seen and written so far use QUERY SYNTAX, which expresses your query as a series of clauses (
where, etc.) in a statement. LINQ also provides another way of expressing queries, called METHOD SYNTAX, which, as you might expect, expresses the query using method calls rather than statements.
Instead of expressing a query as a statement:
You can express it as a method call:
Query syntax is the recommended format (does anybody actually enjoy writing lambdas?), but some LINQ methods, like