public virtual int Delete(object id) { List <KeyValuePair <string, object> > parameters = new List <KeyValuePair <string, object> >(); parameters.Add(new KeyValuePair <string, object>(this.PrimaryKey, id)); return(DbLogic.Delete(DbHelper, this.CurrentTableName, parameters)); }
public virtual int DeleteEntity(params KeyValuePair <string, object>[] parameters) { List <KeyValuePair <string, object> > parametersList = new List <KeyValuePair <string, object> >(); for (int i = 0; i < parameters.Length; i++) { parametersList.Add(parameters[i]); } return(DbLogic.Delete(DbHelper, this.CurrentTableName, parametersList)); }
public virtual int Delete(string name, object[] values) { int returnValue = 0; for (int i = 0; i < values.Length; i++) { List <KeyValuePair <string, object> > parameters = new List <KeyValuePair <string, object> >(); parameters.Add(new KeyValuePair <string, object>(name, values[i])); returnValue += DbLogic.Delete(DbHelper, this.CurrentTableName, parameters); } return(returnValue); }
public virtual int Delete(List <KeyValuePair <string, object> > parameters) { return(DbLogic.Delete(DbHelper, this.CurrentTableName, parameters)); }
// // 删除数据部分 // public virtual int Delete() { return(DbLogic.Delete(DbHelper, this.CurrentTableName)); }