Chapter 5. Writing Query Expressions

This chapter explores the various rules and syntactical elements that define the structure of LINQ query expressions. It covers the seven types of query expression clauses and explains the four ways in which they introduce range variables. In the next chapter, you will read about the 49 different LINQ operators that can play 12 different roles in a query expression.

This chapter analyzes the structure of query expressions. It is divided into five main sections and various subsections:

• Syntactical analysis

Nomenclature

Clauses

Range variables

• Composing queries

Group-by clauses

The into keyword

Let clauses

• Joins

Inner joins

Group joins

Left outer joins

Using the object model to “join” classes

• Projections ...

Get Essential LINQ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.