예제 #1
0
 public CoursesViewModel GetCourses()
 {
     return(new CoursesViewModel()
     {
         Courses = _courseRepository.GetCourses()
     });
 }
        public IActionResult GetStudentsbyCourseview(int CourseId)
        { //GetStudentsbyCourseview
          //IEnumerable<StudentCourse> model = _studentsCoursesRepository.GetStudent(id);

            ViewData["PageTitle"] = _coursesRepository.GetCourses(CourseId).CourseName;
            IEnumerable <StudentCourse> sinCId = _studentsCoursesRepository.GetStudent(CourseId);
            var studentsincourse = _studentsRepository.GetStudent(sinCId);

            return(PartialView("StudentsListView", studentsincourse));
        }
        public IActionResult Index(string message = null, string error = null)
        {
            ViewBag.Message = message;
            ViewBag.Error   = error;

            CoursesIndexViewModel coursesIndexViewModel = new CoursesIndexViewModel()
            {
                Courses = _coursesRepository.GetCourses().ToList()
            };

            return(View(coursesIndexViewModel));
        }
예제 #4
0
        public IEnumerable <CoursesListItemDTO> GetCourses(string semester)
        {
            var courses = _repo.GetCourses(semester);

            return(courses);
        }
예제 #5
0
        public IEnumerable <CourseDTO> GetCourses()
        {
            var courses = _repo.GetCourses();

            return(courses);
        }
        public async Task <IActionResult> GetCourses()
        {
            var courses = await _repo.GetCourses();

            return(Ok(courses));
        }
        public async Task <IEnumerable <CourseResponse> > Handle(GetCoursesQuery query, CancellationToken token)
        {
            var course = await _repository.GetCourses();

            return(_mapper.Map <IEnumerable <CourseResponse> >(course));
        }
예제 #8
0
 public CourseDto GetCourses(string id)
 {
     return(_courseRepository.GetCourses(id));
 }