About This eBook by Bart De Smet

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Continuing a Query Expression Using the into Clause

Although most query expression clauses can be followed by others immediately, there are a few notable exceptions. In particular, select and group by end a query expression because of their projective characteristic. For example:

var query = from product in products            select new { product.Name, product.Price };

Once the projection has happened, the query expression produces objects of the type used in the select clause. In this particular example, that’s an anonymous type with two properties: Name and Price. At this point, we don’t have an identifier anymore to refer to those objects: If product would still be “in scope,” we could get access to properties ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required