The problem is that there's no easy translation into SQL for Last
or Reverse
, so either convert it to something in memory (ToList
, ToArray
) if there aren't going to be too many records, or you could run the query a 2nd time, with OrderByDescending
instead of OrderBy
and use First
.