Exemplo n.º 1
0
        private static void Delete(DapperDbContext db)
        {
            var user = db.Query <User>(x => x.Name == "张三").FirstOrDefault();

            db.Delete(user);
            Add(db);
            db.Delete <User>(x => x.Name == "张三");
            Add(db);
            db.DeleteAll <User>();
            Add(db);
        }