示例#1
0
        public async Task Decrement()
        {
            LCQuery <LCObject> query   = new LCQuery <LCObject>("Account");
            LCObject           account = await query.Get("5e154a5143c257006fbff63f");

            TestContext.WriteLine(account["balance"]);
            int balance = (int)account["balance"];

            account.Increment("balance", -10);
            await account.Save();

            TestContext.WriteLine(account["balance"]);
            Assert.AreEqual((int)account["balance"], balance - 10);
        }