public IEnumerable <AppRole> GetAll(string filter = null)
 {
     if (!string.IsNullOrEmpty(filter))
     {
         return(_appRole.GetMulti(x => x.Name.Contains(filter) || x.Description.Contains(filter) && x.IsDeleted == false));
     }
     return(_appRole.GetMulti(x => x.IsDeleted == false || x.IsDeleted == null));
 }
Exemple #2
0
        public IEnumerable <ApplicationRole> GetAll(int take, int skip, out int totalRow, string filter = null)
        {
            var query = _appRoleRepository.GetMulti(_ => !_.IsDeactive && (_.Name.Contains(filter) || _.Description.Contains(filter)));

            totalRow = query.Count();

            return(query.OrderBy(x => x.Name).Skip(skip).Take(take));
        }
 public IEnumerable <ApplicationRole> GetAll(string keyword)
 {
     if (!string.IsNullOrEmpty(keyword))
     {
         return(_appRoleRepository.GetMulti(x => x.Name.Contains(keyword)));
     }
     else
     {
         return(_appRoleRepository.GetAll());
     }
 }
 public IEnumerable <ApplicationRole> GetAll()
 {
     return(_appRoleRepository.GetMulti(x => x.IsDeleted == false || x.IsDeleted == null));
 }