Пример #1
0
        private static void Query(SQLiteDbContext db)
        {
            //var u = new User {
            //    Name = "测试"
            //};

            //db.Add<User>(u);

            var aa1 = db.Query <User>(x => x.Id > 12).Select(x => new { title = x.Name }).ToList();

            var aa = db.Query <User>(x => x.Id > 0).ToList();

            var d = db.SqlQueryDynamic(" select * from users ", null);

            var dta = db.SqlQueryDataTable(" select * from users ", null);

            db.Update <User>(x => x.Id > 0, x => new User {
                Name = "212"
            });

            db.Query <User>(x => x.Id == 12).FirstOrDefault();
        }