protected virtual Expression VisitDelete(DbDeleteExpression delete) { DbTableExpression table = (DbTableExpression)Visit(delete.Table); Expression where = Visit(delete.Where); return(UpdateDelete(delete, table, where)); }
protected DbDeleteExpression UpdateDelete(DbDeleteExpression delete, DbTableExpression table, Expression where) { if (table != delete.Table || where != delete.Where) { return(new DbDeleteExpression(table, where)); } return(delete); }
protected DbDeleteExpression UpdateDelete(DbDeleteExpression delete, DbTableExpression table, Expression where) { if (table != delete.Table || where != delete.Where) return new DbDeleteExpression(table, where); return delete; }
protected virtual Expression VisitDelete(DbDeleteExpression delete) { DbTableExpression table = (DbTableExpression)Visit(delete.Table); Expression where = Visit(delete.Where); return UpdateDelete(delete, table, where); }
protected virtual bool CompareDelete(DbDeleteExpression x, DbDeleteExpression y) { return(Compare(x.Table, y.Table) && Compare(x.Where, y.Where)); }
protected override Expression VisitDelete(DbDeleteExpression delete) { return(this.BuildExecuteCommand(delete)); }
protected override Expression VisitDelete(DbDeleteExpression delete) { this.Write("DELETE FROM "); bool saveHideTable = this.HideTableAliases; bool saveHideColumn = this.HideColumnAliases; this.HideTableAliases = true; this.HideColumnAliases = true; this.VisitSource(delete.Table); if (delete.Where != null) { this.WriteLine(Indentation.Same); this.Write("WHERE "); this.Visit(delete.Where); } this.HideTableAliases = saveHideTable; this.HideColumnAliases = saveHideColumn; return delete; }
protected virtual bool CompareDelete(DbDeleteExpression x, DbDeleteExpression y) { return Compare(x.Table, y.Table) && Compare(x.Where, y.Where); }