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

            return(lectures);
        }