projection

Choosing which fields or columns a query returns, or reshaping each result into a different form.

In more detail

In SQL the select list performs projection, while the WHERE clause performs selection, which chooses rows. In LINQ and other collection libraries a Select or map operation projects each item. Projecting to just the fields you need keeps queries and responses small.

Example

.Select(p => new ProductResponse(p.Id, p.Name, p.Price))

Related terms

Taught in

References