public void TestUpate2() { DbObjects.SQLServer.DbObject db = new DbObjects.SQLServer.DbObject(); db.DbConnectStr = ConnStr; db.Update("sore="+db.GetParameterName("sore"), "where sore>=100", "students", null,new KeyValuePair<string, object>(db.GetParameterName("sore"),50)); }
public void TestDelete2() { DbObjects.SQLServer.DbObject db = new DbObjects.SQLServer.DbObject(); db.DbConnectStr = ConnStr; Assert.AreEqual(db.Delete("where sore<" + db.GetParameterName("sore"), "students", null, new KeyValuePair <string, object>(db.GetParameterName("sore"), 50)), true); }
public void TestDelete2() { DbObjects.SQLServer.DbObject db = new DbObjects.SQLServer.DbObject(); db.DbConnectStr = ConnStr; Assert.AreEqual(db.Delete("where sore<" + db.GetParameterName("sore"), "students", null, new KeyValuePair<string, object>(db.GetParameterName("sore"), 50)),true); }
public void TestUpdate() { DbObjects.SQLServer.DbObject db = new DbObjects.SQLServer.DbObject(); db.DbConnectStr = ConnStr; Student student = db.QueryModel<Student>("select * from td_student where id=" + db.GetParameterName("id"), new KeyValuePair<string, object>(db.GetParameterName("id"), 6)); student.ID =6; student.StudentName = "Studentfsafasfasf"; student.ClassName = "Class4sfasdfas"; student.InTime=DateTime.Now; student.Score = 30; db.Update(student); }
public void TestUpate2() { DbObjects.SQLServer.DbObject db = new DbObjects.SQLServer.DbObject(); db.DbConnectStr = ConnStr; db.Update("sore=" + db.GetParameterName("sore"), "where sore>=100", "students", null, new KeyValuePair <string, object>(db.GetParameterName("sore"), 50)); }
public void TestUpdate() { DbObjects.SQLServer.DbObject db = new DbObjects.SQLServer.DbObject(); db.DbConnectStr = ConnStr; Student student = db.QueryModel <Student>("select * from td_student where id=" + db.GetParameterName("id"), new KeyValuePair <string, object>(db.GetParameterName("id"), 6)); student.ID = 6; student.StudentName = "Studentfsafasfasf"; student.ClassName = "Class4sfasdfas"; student.InTime = DateTime.Now; student.Score = 30; db.Update(student); }