You are previewing Essential LINQ.

Essential LINQ

Cover of Essential LINQ by Charlie Calvert... Published by Addison-Wesley Professional

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



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 ...

The best content for your career. Discover unlimited learning on demand for around $1/day.