Ejemplo n.º 1
0
        public static SelectSubqueryData Create(QueryParts parts, SubqueryParts subquery)
        {
            Contract.Requires(parts != null);
            Contract.Requires(subquery != null);

            var selects = new List<KeyValuePair<IQuerySource, Func<object, object>>>();
            foreach (var s in subquery.Selects)
            {
                var factory = QuerySourceConverterFactory.Create(s.QuerySource, parts);
                selects.Add(new KeyValuePair<IQuerySource, Func<object, object>>(factory.QuerySource, factory.Instancer));
            }

            return new SelectSubqueryData(selects);
        }
 private SubqueryGeneratorQueryModelVisitor(QueryParts parentQuery, bool canQueryInMemory, Expression selector, string contextName, QueryContext context)
 {
     QueryParts = new SubqueryParts(parentQuery, canQueryInMemory, selector, contextName, context);
 }