Beispiel #1
0
        /// <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));
            }
        }
Beispiel #2
0
 /// <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);
 }