Beispiel #1
0
        static void TestEntityTableUpdate()
        {
            EntityTableEngine engine = new EntityTableEngine(null);

            Console.WriteLine("修改前:" + engine.Find <Person>("testperson", "ljc2").First().Age);
            engine.Update <Person>("testperson", new Person
            {
                Name = "ljc2",
                Age  = 30
            });
            Console.WriteLine("修改后:" + engine.Find <Person>("testperson", "ljc2").First().Age);
        }
Beispiel #2
0
        static void TestEntityTableRead()
        {
            EntityTableEngine engine = new EntityTableEngine(null);
            DateTime          st     = DateTime.Now;

            //for (int i = 0; i < 10000; i++)
            {
                foreach (var item in engine.Find <Person>("testperson", "ljc2"))
                {
                    Console.WriteLine(item.Name + "," + item.Age);
                }
            }

            Console.WriteLine("用时:" + (DateTime.Now.Subtract(st).TotalMilliseconds));
        }