//		private Expression VisitSelect (MethodCallExpression methodCall)
        //		{
        //			List<MemberExpression> mes = MemberExpressionFinder.Find (methodCall.Arguments[1], this.tableFinder);
        //			if (!TryGetTable (mes))
        //				return methodCall;
        //
        //			Type returnType = null;
        //
        //			List<Tuple<string, Type>> projs = new List<Tuple<string, Type>>();
        //			foreach (MemberExpression me in mes)
        //			{
        //				Tuple<string, Type> column = this.tableFinder.GetColumn (me.Member);
        //				if (column == null)
        //					return methodCall;
        //
        //				if (returnType == null)
        //					returnType = column.Item2;
        //				if (returnType != column.Item2)
        //					return methodCall;
        //
        //				projs.Add (column);
        //			}
        //
        //			ReturnType = returnType;
        //			this.fallback = true;
        //
        //			(this.projections ?? (this.projections = new List<Tuple<string, Type>>()))
        //				.AddRange (projs);
        //
        //			return methodCall.Arguments[0];
        //		}

        private Expression VisitSelectMany(MethodCallExpression methodCall)
        {
            List <MemberExpression> mes = MemberExpressionFinder.Find(methodCall, this.tableFinder);

            if (mes.Count > 1)
            {
                this.fallback = true;
                return(methodCall);
            }

            if (!TryGetTable(mes))
            {
                return(methodCall);
            }

            ContentResolverColumnMapping column = this.tableFinder.GetColumn(mes[0].Member);

            if (column == null || column.ReturnType.GetGenericTypeDefinition() != typeof(IEnumerable <>))
            {
                this.fallback = true;
                return(methodCall);
            }

            ReturnType = column.ReturnType.GetGenericArguments()[0];

            return(Expression.Constant(Activator.CreateInstance(typeof(Query <>).MakeGenericType(ReturnType), this.provider)));
            //return methodCall.Arguments[0];
        }
    internal static List<MemberExpression> Find(Expression expression, ITableFinder tableFinder)
    {
      if (expression == null)
        throw new ArgumentNullException("expression");
      if (tableFinder == null)
        throw new ArgumentNullException("tableFinder");

      var finder = new MemberExpressionFinder(tableFinder);
      finder.Visit(expression);

      return finder.expressions;
    }
        internal static List <MemberExpression> Find(Expression expression, ITableFinder tableFinder)
        {
            if (expression == null)
            {
                throw new ArgumentNullException("expression");
            }
            if (tableFinder == null)
            {
                throw new ArgumentNullException("tableFinder");
            }

            var finder = new MemberExpressionFinder(tableFinder);

            finder.Visit(expression);

            return(finder.expressions);
        }