Ejemplo n.º 1
0
        public static ReadOnlyCollection <QueryCommand> Gather(Expression expression)
        {
            var gatherer = new CommandGatherer();

            gatherer.Visit(expression);
            return(gatherer.commands.AsReadOnly());
        }
Ejemplo n.º 2
0
        public override string GetQueryText(Expression expression)
        {
            Expression plan     = this.GetExecutionPlan(expression);
            var        commands = CommandGatherer.Gather(plan).Select(c => c.CommandText).ToArray();

            return(string.Join("\n\n", commands));
        }