public IEnumerable <CourseCategory> GetAll(string keyword) { if (!string.IsNullOrEmpty(keyword)) { return(_CourseCategoryRepository.GetMulti(x => x.Name.Contains(keyword) || x.Description.Contains(keyword))); } else { return(_CourseCategoryRepository.GetAll()); } }
public IEnumerable <CourseCategory> GetCategories() { IEnumerable <CourseCategory> model; model = courseCategorysRepository .GetMulti(x => x.Status) .OrderBy(m => m.DisplayOrder) .ToList(); return(model); }