Exemple #1
0
        public ActionResult <IEnumerable <StudentReadDto> > GetAllStudents()
        {
            IEnumerable <Student> students = _repository.GetAllStudent();

            if (students != null)
            {
                return(Ok(_mapper.Map <IEnumerable <StudentReadDto> >(students)));
            }
            return(NotFound());
        }
 public List <Student> GetAllStudents()
 {
     return(_studentRepo.GetAllStudent());
 }
Exemple #3
0
        public IActionResult Index()
        {
            var model = _er.GetAllStudent();

            return(View(model));
        }
Exemple #4
0
 public async Task <IEnumerable <Student> > GetStudents()
 {
     return(await studentRepo.GetAllStudent());
 }