예제 #1
0
        public async Task And()
        {
            LCQuery <LCObject> q1 = new LCQuery <LCObject>("Account");

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

            q2.WhereLessThan("balance", 500);
            LCQuery <LCObject> query = LCQuery <LCObject> .And(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);
            });
        }