internal DataTablesQueryable(IQueryable <TEntity> query, DataTablesRequest <TEntity, TEntityViewModel> request)
 {
     _sourceQueryable = query;
     _sourceProvider  = new DataTablesQueryProvider <TEntity, TEntityViewModel>(query.Provider, request);
     Request          = request;
 }
Example #2
0
        /// <summary>
        /// Renders the results based on the given <see cref="DataTablesRequest{TEntity, TEntityViewModel}"/>.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <returns></returns>
        public virtual IPagedList <TEntityViewModel> RenderResults(DataTablesRequest <TEntity, TEntityViewModel> request)
        {
            Configure();

            return(Query().ToPagedList(request));
        }
Example #3
0
 internal DataTablesQueryProvider(IQueryProvider sourceProvider, DataTablesRequest <TEntity, TEntityViewModel> request)
 {
     this.sourceProvider = sourceProvider;
     this.request        = request;
 }