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

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

            results.ForEach(item => {
                Assert.NotNull(item["user"]);
            });

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

            results.ForEach(item => {
                Assert.IsNull(item["user"]);
            });
        }
Ejemplo n.º 2
0
        public async Task Exist()
        {
            LCQuery <LCObject> query = new LCQuery <LCObject>("Account");

            query.WhereExists("user");
            ReadOnlyCollection <LCObject> results = await query.Find();

            foreach (LCObject item in results)
            {
                Assert.NotNull(item["user"]);
            }

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

            foreach (LCObject item in results)
            {
                Assert.IsNull(item["user"]);
            }
        }