Пример #1
0
        /// <summary>
        /// Generates the query and returns data in <typeparamref name="TResult"/>
        /// </summary>
        /// <param name="queryable">IQueryable</param>
        /// <param name="evaluator">IQueryableEvaluatos</param>
        /// <returns>Data resulting from the query</returns>
        protected override IPagedQueryResult <TResult> GenerateResult(IQueryable <TEntity> queryable, IQueryableEvaluator evaluator)
        {
            var materialized = this.Materialize(queryable);
            var values       = evaluator.ToArray(materialized);

            return(new PagedQueryResult <TResult>(values, this.Take, this.Skip, this.count));
        }