public TBuilder SortUsing <TBaseRequest>(
            Func <TBaseRequest, IQueryable <TEntity>, IOrderedQueryable <TEntity> > sortFunc)
        {
            if (!typeof(TBaseRequest).IsAssignableFrom(typeof(TRequest)))
            {
                throw new ContravarianceException(nameof(SortUsing), typeof(TBaseRequest), typeof(TRequest));
            }

            Sorter = FunctionSorterFactory.From(sortFunc);

            return((TBuilder)this);
        }
 /// <summary>
 /// Configures how a query's results should be ordered.
 /// </summary>
 public TBuilder SortCustom(Func <TRequest, IQueryable <TEntity>, IOrderedQueryable <TEntity> > sortFunc)
 {
     return(SetSorter(FunctionSorterFactory.From(sortFunc)));
 }