Ejemplo n.º 1
0
 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());
 }
Ejemplo n.º 2
0
 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);
      }
Ejemplo n.º 4
0
 public IEnumerable <LecturerDto> GetAll()
 {
     return(Mapper.Map <IEnumerable <Lecturer>, IEnumerable <LecturerDto> >(_lecturerRepository.GetAll()));
 }
Ejemplo n.º 5
0
 public IEnumerable <Lecturer> GetAll()
 {
     return(_lecturerRepository.GetAll());
 }
Ejemplo n.º 6
0
 public List <Lecturer> GetAllLecturers()
 {
     return(_lecturerRepository.GetAll().ToList());
 }
Ejemplo n.º 7
0
        public List <Lecturer> GetAll()
        {
            var lectures = _lectureRepository.GetAll().ToList();

            return(lectures);
        }