Esempio n. 1
0
        public IEnumerable <Function> GetAll(string filter)
        {
            var query = _functionRepository.GetMulti(x => x.Status);

            if (!string.IsNullOrEmpty(filter))
            {
                query = query.Where(x => x.Name.Contains(filter));
            }
            return(query.OrderBy(x => x.ParentId));
        }
Esempio n. 2
0
 public IEnumerable <Function> GetAll(string filter)
 {
     if (string.IsNullOrEmpty(filter))
     {
         IEnumerable <Function> query = _functionRepository.GetMulti(x => x.Status).OrderBy(x => x.ParentId);
         return(query);
     }
     else
     {
         IEnumerable <Function> query = _functionRepository.GetMulti(x => x.Name.Contains(filter) && x.Status).OrderBy(x => x.ParentId);
         return(query);
     }
 }
Esempio n. 3
0
 public IEnumerable <Function> GetAll()
 {
     return(_functionRepository.GetMulti(x => x.Status).OrderBy(x => x.DisplayOrder));
 }