Esempio n. 1
0
        public IEnumerable <ApplicationGroup> GetAll(int skip, int take, out int totalRow, string filter)
        {
            var query = _appGroupRepository.GetMulti(_ => !_.IsDeactive && (_.Name.Contains(filter) || _.Description.Contains(filter)));

            totalRow = query.Count();

            return(query.OrderBy(x => x.Name).Skip(skip).Take(take));
        }
 public IEnumerable <ApplicationGroup> GetAll(string keyword)
 {
     if (!string.IsNullOrEmpty(keyword))
     {
         return(_appGroupRepository.GetMulti(x => x.Name.Contains(keyword)));
     }
     else
     {
         return(_appGroupRepository.GetAll());
     }
 }
Esempio n. 3
0
        public IEnumerable <ApplicationGroup> GetAllPaging(int page, int pageSize, out int totalRow, string filter)
        {
            var query = _appGroupRepository.GetMulti(p => !p.IsDelete);

            if (!string.IsNullOrEmpty(filter))
            {
                query = query.Where(x => x.Name.Contains(filter));
            }

            totalRow = query.Count();
            return(query.OrderBy(x => x.Name).Skip(page * pageSize).Take(pageSize));
        }
Esempio n. 4
0
 public IEnumerable <ApplicationGroup> GetAll(string keyword = null)
 {
     return(_appGroupRepository.GetMulti(x => x.IsDeleted == false));
 }