예제 #1
0
        // GET: Supervisors
        public async Task <IActionResult> Index()
        {
            var supervisors = await _supervisorRepository.GetAll();

            var supervisorIndexViewModel = new List <SupervisorIndexViewModel>();

            foreach (var supervisor in supervisors)
            {
                supervisorIndexViewModel.Add(_mapper.Map <SupervisorIndexViewModel>(supervisor));
            }


            return(View(supervisorIndexViewModel));
        }
 public async Task <IEnumerable <SupervisorVM> > GetSupervisors()
 {
     return(await _supervisorRepository.GetAll());
 }
예제 #3
0
 public List <Supervisor> GetAll()
 {
     return(repo.GetAll());
 }