public async Task <List <Section> > Sections() => (await _sectionRepository.GetAllAsync()).ToList();
public async Task <IActionResult> Index() { var items = await _sectionRepository.GetAllAsync(); return(Ok(items)); }
public async Task <IEnumerable <SectionDTO> > GetAllAsync() { var sections = await _repository.GetAllAsync(); return(_mapper.Map <IEnumerable <SectionDTO> >(sections)); }
public async Task <ActionResult <IEnumerable <GetSectionNameViewModel> > > GetSectionsNames() { var sections = await sectionRepository.GetAllAsync(); return(Ok(sections.Select(s => new GetSectionNameViewModel(s)))); }