You need to use the Linq expression format, rather than the statement format.
var result = list.OrderByDescending(x => x.id).ThenByDescending(x => x.amount).Where(item=>item.active==false).FirstOrDefault();
Notice:
- removal of the "from item in"
- The concatenation the the
Where
clause
- The introduction of the
item
parameter in the Where
method - The remove of the select item