Esempio n. 1
0
        private Expression BuildInner(Expression expression)
        {
            var eb = new ExecutionBuilder(this.Dialect, this.dbContext, this.executor);

            eb.scope           = this.scope;
            eb.receivingMember = this.receivingMember;
            eb.nReaders        = this.nReaders;
            eb.nLookup         = this.nLookup;
            eb.variableMap     = this.variableMap;
            return(eb.Build(expression));
        }
Esempio n. 2
0
        public static Expression Build(IDialect dialect, InternalDbContext policy, Expression expression, Expression provider)
        {
            var executor  = Expression.Parameter(typeof(ExecutionService), "executionService");
            var builder   = new ExecutionBuilder(dialect, policy, executor);
            var dbContext = Expression.Convert(provider, typeof(InternalDbContext));

            builder.variables.Add(executor);
            builder.initializers.Add(Expression.New(MethodRepository.ExecutorCtor, dbContext));
            var result = builder.Build(expression);

            return(result);
        }