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"]); }
public async Task Serialization() { await LCUser.Login("hello", "world"); LCQuery <LCObject> query = new LCQuery <LCObject>("Account") { IncludeACL = true }; query.OrderByDescending("createdAt"); ReadOnlyCollection <LCObject> accounts = await query.Find(); foreach (LCObject account in accounts) { TestContext.WriteLine($"public read access: {account.ACL.PublicReadAccess}"); TestContext.WriteLine($"public write access: {account.ACL.PublicWriteAccess}"); } }