Example 1: Select — Field Projection
The Select<T> extension takes a list of field paths. The body is a bare JSON array of strings; inside a Filter or a Segment the same list goes under selects. Each variant below shows a different projection style.
A typed row is still a whole T: the members you did not ask for come back at their defaults rather than being absent.
Direct scalars
["Id", "Name", "Price"]Dotted path through reference navigation
["Id", "Name", "Category.Name"]Category is projected with only the requested Name sub-field (Id auto-included).
Dotted path through collection navigation
["Id", "Name", "Category.Vendors.Id"]Category.Vendors is a collection — each Vendor element is projected with only its Id (Id auto-included).
Whole navigation object (non-dotted)
["Id", "Name", "Category"]The entire Category object is bound as-is.
Whole collection (non-dotted)
["Id", "Name", "Brands"]The entire Brands collection is bound as-is.
Note
Backend:
query.Select(fields)Related
- Select extension
- SelectDynamic example — same paths, dynamic return type.