public List <CourseCategoryDto> GetAll() { var entities = _Repository.GetAll(); var p = entities.Adapt <List <CourseCategoryDto> >(); return(p); }
public IEnumerable <CourseCategory> GetCategories(int page, int pageSize, out int totalRow, string filter = null) { var model = courseCategorysRepository.GetAll(); if (!string.IsNullOrEmpty(filter)) { model = model.Where(x => x.Name.Contains(filter)); } totalRow = model.Count(); return(model.OrderBy(x => x.DisplayOrder).Skip(page * pageSize).Take(pageSize)); }
public IEnumerable <CourseCategory> GetAll() { return(_CourseCategoryRepository.GetAll()); }
public async Task <List <CourseCategoryDTO> > GetAll() { var data = await _repository.GetAll(); return(data.Adapt <List <CourseCategoryDTO> >()); }
public List <CourseCategoryDTO> GetAll() { var entities = _repository.GetAll(); return(entities.Adapt <List <CourseCategoryDTO> >()); }