How do I formulate the following in LINQ with LAMBDA expressions.
Given (for simplicity – this is actually later a join) a table with the fields:
- Item
- Price
- Timestamp
which is mapped to a class. I use BlToolkit, but could also be LINQ or EF – makes no difference.
I want the object with Item = 2 and the highest timestamp (newest) and / or a query of ALL items but ONLY the most current object.
How do I formulate this?
I understand there will likely be a subselect involved, but I have a problem finding the correct syntax.
Using fluent syntax, the item with the highest timestamp, and
Item==2is: