public void demo_update() { UserInfoM tb = new UserInfoM(); tb.sex = 1;//男的 tb.where ("id=?", 22).update(); }
public void demo_update3() { var data = new Dictionary <string, object>(); UserInfoM tb = new UserInfoM(); tb.where ("id=?", 22).update((key) => { switch (key) { case "sex": return(1); case "name": return("cc"); default: return(null); } }); }
public void demo_update2() { var data = new Dictionary <string, object>(); UserInfoM tb = new UserInfoM(); tb.where ("id=?", 22).update((key) => { if (data.ContainsKey(key)) { return(data[key]); } else { return(null); } }); }
public void demo_select() { UserInfoM tb = new UserInfoM(); tb.where ("id=?", 22).select("*"); }
public void demo_delete() { UserInfoM tb = new UserInfoM(); tb.where ("id=?", 22).delete(); }