public QueryProviderHelper(Expression <Func <TInput, bool> > predicate, QueryOptions queryOptions)
 {
     this.parameterExpression = predicate.Parameters.First();
     this.body         = predicate.Body;
     this.queryOptions = queryOptions;
 }
        /// <summary>
        /// Gets query from the specified predicate expression.
        /// </summary>
        /// <typeparam name="TInput">The type of the input.</typeparam>
        /// <param name="predicate">The predicate expression.</param>
        /// <param name="queryOptions">The query options.</param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when <paramref name="predicate"/> or <paramref name="queryOptions"/> is null.
        /// </exception>
        /// <exception cref="ArgumentException">
        /// Thrown when <paramref name="predicate"/> is not valid.
        /// </exception>
        public static string Get <TInput>(Expression <Func <TInput, bool> > predicate, QueryOptions queryOptions)
        {
            if (predicate == null)
            {
                throw new ArgumentNullException(nameof(predicate));
            }

            if (queryOptions == null)
            {
                throw new ArgumentNullException(nameof(queryOptions));
            }

            return(new QueryProviderHelper <TInput>(predicate, queryOptions).Get());
        }