The select
clause of a LINQ query projects the output sequence. It transforms each input element into the shape of the output sequence
This sample uses a compound from
clause to select all orders where the order total is greater than 2000.00 and uses from
assignment to avoid requesting the total twice.
This sample uses multiple from
clauses so that filtering on customers can be done before selecting their orders. This makes the query more efficient by not selecting and then discarding orders for customers outside of Washington.
This sample uses an indexed SelectMany
clause to select all orders, while referring to customers by the order in which they are returned from the query.
Next: Partition operators » Previous: Restrictions from multiple inputs «