public IEnumerable <Color> GetListColor(string filter)
 {
     if (!string.IsNullOrEmpty(filter))
     {
         return(_colorRepository.GetMulti(x => x.Name.Contains(filter)));
     }
     return(_colorRepository.GetAll());
 }
Example #2
0
 public IEnumerable <Color> GetAll(string keyword)
 {
     if (!string.IsNullOrEmpty(keyword))
     {
         return(_colorRepository.GetMulti(x => x.Name.Contains(keyword)));
     }
     else
     {
         return(_colorRepository.GetAll());
     }
 }