In a LINQ query that starts with: from o in orderItems
The orderItems collection is a collection of OrderItem with properties called UnitPrice, Discount, and Quantity. You want the query to filter out OrderItem objects whose totalPrice (UnitPrice * Quantity * Discount) result is less than 100. You want to sort by totalPrice, and you want to include the total price in your select clause.
Which keyword can you use to create a totalPrice result within the LINQ query so you don't have to repeat the formula three times?
Interview question and answer by:
Rajkatie | Posted on: 8/7/2012 | Category:
ADO.NET Interview questions | Views: 696 | |
Points: 40
Select from following answers:- by
- on
- let
 - into
The let keyword declares a range variable in your LINQ query.
The on keyword is used with the join keyword to specify the join criteria.
The into keyword references the results of a join, group by, or select keyword.
Show Correct Answer |
Source: MeasureUp.com |
|
Alert Moderator
Found interesting? Add this to: