public int Remove(string id) { string command = _removeCommand.GetRemoveCommand(); command += " Where Id = @id"; return(_db.Execute(command, new { id })); }
public int RemeoveWithWhereClause(Expression <Predicate <T> > expression, object obj) { var command = removeCommand.GetRemoveCommand(); var bExp = (BinaryExpression)expression.Body; var name = CheckBody(bExp); var dView = bExp.ToString(); string whereClause = ""; if (expression.Parameters.Count == 1) { whereClause = GenerateWhere.Generate(expression.Parameters[0].ToString(), dView); } command += " Where " + whereClause; return(_db.Execute(command, obj)); }
public int RemoveAll() { string command = _removeCommand.GetRemoveCommand(); return(_db.Execute(command)); }