Ejemplo n.º 1
0
        public async Task Or()
        {
            LCQuery <LCObject> q1 = new LCQuery <LCObject>("Account");

            q1.WhereLessThanOrEqualTo("balance", 100);
            LCQuery <LCObject> q2 = new LCQuery <LCObject>("Account");

            q2.WhereGreaterThanOrEqualTo("balance", 500);
            LCQuery <LCObject> query = LCQuery <LCObject> .Or(new List <LCQuery <LCObject> > {
                q1, q2
            });

            List <LCObject> results = await query.Find();

            TestContext.WriteLine(results.Count);
            results.ForEach(item => {
                int balance = (int)item["balance"];
                Assert.IsTrue(balance <= 100 || balance >= 500);
            });
        }