1

actually I'm asking how can i select all field in last record like this expression in sql:

Select * From Example OrderBy Descending

But I want to use Linq to Entity Lambda Expression.

Please Excuse if my question is cheap for you experts.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
amin
  • 1,194
  • 1
  • 12
  • 20
  • possible duplicate of [How to do Select All(\*) in linq to sql](http://stackoverflow.com/questions/1586013/how-to-do-select-all-in-linq-to-sql) – Gert Arnold Dec 01 '13 at 00:27

1 Answers1

0

You don't need to, just don't use a select and you already have everything You'd still have to tell it what you want to order by (but it's the same in SQL, what you mentioned up there isn't valid)

MyContext.Example
 .OrderBy(item=>item.Name) // this orders by name
  // Just don't do a select here & you have every field, you're already working with an ienumerable<Example>
Ronan Thibaudau
  • 3,413
  • 3
  • 29
  • 78