public virtual IQueryable <TEntity> Filter(
            Expression <Func <TEntity, bool> > filter,
            Func <IQueryable <TEntity>,
                  IOrderedQueryable <TEntity> > orderBy,
            out int total,
            int index = 0,
            int size  = 25)
        {
            int skipCount = index * size;
            IQueryable <TEntity> resetSet =
                orderBy(filter != null ? AllAsQueryable.Where(filter) : AllAsQueryable);

            total    = resetSet.Count();
            resetSet = skipCount == 0 ? resetSet.Take(size) : resetSet.Skip(skipCount).Take(size);
            return(resetSet);
        }
 public virtual IQueryable <TEntity> Filter(Expression <Func <TEntity, bool> > predicate)
 {
     return(AllAsQueryable.Where(predicate));
 }