private void AddPostProcessing(MethodCallExpression method, ITranslationResult result)
        {
            Type type = method.Arguments[0].Type.GetGenericArguments()[0];
            ParameterExpression  parameter = Expression.Parameter(typeof(IQueryable <>).MakeGenericType(type), null);
            MethodCallExpression call      = Expression.Call(method.Method, parameter, method.Arguments[1]);

            result.AddPostProcesing(Expression.Lambda(call, parameter));
        }
        public void AddPostProcessing(MethodCallExpression method)
        {
            Type type        = method.Arguments[0].Type.GetGenericArguments()[0];
            Type genericType = typeof(IQueryable <>).MakeGenericType(type);

            ParameterExpression parameter  = Expression.Parameter(genericType, null);
            MethodInfo          methodInfo = typeof(System.Linq.Queryable)
                                             .GetMethods()
                                             .Single(p => p.Name == method.Method.Name && p.GetParameters().Length == 1)
                                             .MakeGenericMethod(type);

            MethodCallExpression call = Expression.Call(methodInfo, parameter);

            _result.AddPostProcesing(Expression.Lambda(call, parameter));
        }
        private void AddPostProcessing(MethodCallExpression method, ITranslationResult result)
        {
            Type type = method.Arguments[0].Type.GetGenericArguments()[0];
            ParameterExpression parameter = Expression.Parameter(typeof (IQueryable<>).MakeGenericType(type), null);
            MethodCallExpression call = Expression.Call(method.Method, parameter, method.Arguments[1]);

            result.AddPostProcesing(Expression.Lambda(call, parameter));
        }