public IList <T> GetWithTriModel(Expression <Func <T, bool> > filter = null, Model.TriModel orderBy = null, params Expression <Func <T, object> >[] includeProperties) { return(Query(filter, orderBy, includeProperties).ToList()); }
public PaginationResult <IList <T> > PaginateWithTriModel(PaginationRequest paginateRequest, Expression <Func <T, bool> > filter = null, Model.TriModel orderBy = null, params Expression <Func <T, object> >[] includeProperties) { var skip = (paginateRequest.PageNumber - 1) * paginateRequest.PageSize; var take = paginateRequest.PageSize; var count = this.Count(filter); var result = Query(filter, orderBy, includeProperties).Skip(skip).Take(take).ToList(); return(new PaginationResult <IList <T> >(count, result)); }