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:|
Show Correct Answer
| Alert Moderator
Found interesting? Add this to: