Exemple #1
0
 public PaginationFilter()
 {
     ResultPagesModel = new ResultPagesModel
     {
         Offset = 10,
         Actual = 0
     };
 }
        public IQueryable <T> GetList(System.Linq.Expressions.Expression <Func <T, bool> > predicate, ResultPagesModel pagination, out long totalItems)
        {
            var query = context.Set <T>().Where(predicate);

            totalItems = query.LongCount();
            query      = query.Skip(pagination.Actual.ToInt32()).Take(pagination.Offset.ToInt32());

            return(query);
        }
 public IQueryable <T> GetList(System.Linq.Expressions.Expression <Func <T, bool> > predicate, ResultPagesModel pagination)
 {
     return(context.Set <T>().Where(predicate).Skip(pagination.Actual.ToInt32()).Take(pagination.Offset.ToInt32()));
 }