예제 #1
0
        protected virtual Expression VisitDelete(DbDeleteExpression delete)
        {
            DbTableExpression table = (DbTableExpression)Visit(delete.Table);

            Expression where = Visit(delete.Where);
            return(UpdateDelete(delete, table, where));
        }
예제 #2
0
        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));
 }
예제 #6
0
 protected override Expression VisitDelete(DbDeleteExpression delete)
 {
     return(this.BuildExecuteCommand(delete));
 }
예제 #7
0
 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);
 }