/// <summary> /// Visits the command. /// </summary> /// <param name="command">The command.</param> /// <returns></returns> protected virtual Expression VisitCommand(CommandExpression command) { switch ((DbExpressionType)command.NodeType) { case DbExpressionType.If: return(this.VisitIf((IFCommand)command)); case DbExpressionType.Block: return(this.VisitBlock((BlockCommand)command)); case DbExpressionType.Declaration: return(this.VisitDeclaration((DeclarationCommand)command)); default: return(this.VisitUnknown(command)); } }
/// <summary> /// Visits the command. /// </summary> /// <param name="command">The command.</param> /// <returns></returns> protected virtual Expression VisitCommand(CommandExpression command) { this.Write(this.FormatQuery(command)); return(command); }