liveBook · Manning

Select

Select is a LINQ sequence operator that transforms each source element into a corresponding projected result.

How 2 Manning books explain it

.NET in Action, Second Edition

Select is a LINQ extension method that projects each element of an enumerable sequence into a new form.

How it is used
Projects reflected font properties into names or name-and-font tuples for a web service’s font listing.
How deep it goes
Shows query syntax, its Select method equivalent, and two output shapes; stops short of implementing the extension method.
Examples
Uses PropertyInfo-to-name and PropertyInfo-to-tuple projections while building an ASCII-art font endpoint.
What you can do after
Apply it via LINQ to select the output fields a sequence or service response needs.

Read how .NET in Action, Second Edition explains Select →

ASP.NET Core in Action, 3e

A select clause is a LINQ query operation that projects source elements into a specified result shape.

How it is used
Projects EF Core entities into API-facing view models while limiting database columns to those required by the result.
How deep it goes
Explains projection, SQL execution, nested mapping, and client-side fallback for expressions EF Core cannot translate.
Examples
Uses recipe lists, summary view models, detail view models, formatted cooking times, and nested ingredients as projection examples.
What you can do after
Apply it via EF Core to return filtered lists or individual records as efficiently shaped view models.

Read how ASP.NET Core in Action, 3e explains Select →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.