OrderBy Desc?

3 posts, 0 answers
  1. Duncan
    Duncan avatar
    93 posts
    Member since:
    Jul 2012

    Posted 02 Nov 2011 Link to this post

    Simple questions... I need to get the DESC order. How do i do that in this call:

    IList<SomeTable> sometable = dbContext.SomeTable.Where(t => t.SomeTableID == 2).OrderBy(t => t.DateTime).Take(10).ToList();

    Thanks in advance,
    Duncan
  2. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 02 Nov 2011 Link to this post

    Hi Duncan,

    .OrderByDescending(lambda) is your friend.

    Kind regards,
    Thomas
    the Telerik team

    NEW and UPDATED OpenAccess ORM Resources. Check them out!

  3. DevCraft banner
  4. Duncan
    Duncan avatar
    93 posts
    Member since:
    Jul 2012

    Posted 02 Nov 2011 Link to this post

    :) Awesome!!

    Thanks for the quick reply!

    Duncan
Back to Top