locked
How to sort the dates in the Descending order with linq lambda Expression RRS feed

  • Question

  • How to sort the dates in the Descending order with linq lambda Expression using sqlite database,and store the sorted data in the list and the get the data from the list.Windows storeapps using c# and xaml.please let me know how to do this task

    amair

    Tuesday, August 6, 2013 8:31 PM

Answers

  • SQLite.SQLiteAsyncConnection dataBase = await base.OpenDatabase();
    List<History> result = await dataBase.Table<History>().OrderByDescending(a => a.Id).ToListAsync();
    • Proposed as answer by Anne Jing Saturday, August 10, 2013 12:59 PM
    • Marked as answer by Anne Jing Saturday, August 10, 2013 1:00 PM
    Wednesday, August 7, 2013 7:32 AM

All replies

  • Visit sqlite.org/support.html for help in using sqlite in a Windows Store app.


    Visual C++ MVP

    Tuesday, August 6, 2013 9:21 PM
  • SQLite.SQLiteAsyncConnection dataBase = await base.OpenDatabase();
    List<History> result = await dataBase.Table<History>().OrderByDescending(a => a.Id).ToListAsync();
    • Proposed as answer by Anne Jing Saturday, August 10, 2013 12:59 PM
    • Marked as answer by Anne Jing Saturday, August 10, 2013 1:00 PM
    Wednesday, August 7, 2013 7:32 AM