This query returns the last row from Sales.Customer table in Adventure Works database. I am using LINQPad to write and execute my query.

(from c in Customers
select c)
.OrderByDescending(x=> x.CustomerID).First()

 

Here is the result as displayed in LINQPad

 image

Tagged with:
 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>