Esempio n. 1
0
        public async Task OrderBy()
        {
            LCQuery <LCObject> query = new LCQuery <LCObject>("Account");

            query.OrderByAscending("balance");
            ReadOnlyCollection <LCObject> results = await query.Find();

            Assert.LessOrEqual((int)results[0]["balance"], (int)results[1]["balance"]);

            query = new LCQuery <LCObject>("Account");
            query.OrderByDescending("balance");
            results = await query.Find();

            Assert.GreaterOrEqual((int)results[0]["balance"], (int)results[1]["balance"]);
        }