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.
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.
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>