public IActionResult Create() { ViewBag.Lectures = new MultiSelectList(_LecturerRepository.GetAll(), "Id", "Name"); ViewBag.Instructions = _StorageService.GetAllFiles("instructions").Select(w => w.Name).ToList(); ViewBag.WorkSchedules = _StorageService.GetAllFiles("workschedule").Select(w => w.Name).ToList(); return(View()); }
public async Task <IEnumerable <LecturerModel> > Handle(LecturerQuery request, CancellationToken cancellationToken) { if (request.searchTerm == null) { return(await _repository.GetAll()); } else { return(await _repository.Get(request.searchTerm.ToLower())); } }
public IEnumerable <LecturerDTO> GetLecturers() { var lecturers = lecturerRepo.GetAll(); List <LecturerDTO> LecturerDTOs = new List <LecturerDTO>(); foreach (var lecturer in lecturers) { LecturerDTOs.Add(Mapper.Map <LecturerDTO>(lecturer)); } return(LecturerDTOs); }
public IEnumerable <LecturerDto> GetAll() { return(Mapper.Map <IEnumerable <Lecturer>, IEnumerable <LecturerDto> >(_lecturerRepository.GetAll())); }
public IEnumerable <Lecturer> GetAll() { return(_lecturerRepository.GetAll()); }
public List <Lecturer> GetAllLecturers() { return(_lecturerRepository.GetAll().ToList()); }
public List <Lecturer> GetAll() { var lectures = _lectureRepository.GetAll().ToList(); return(lectures); }