Пример #1
0
        public IActionResult Get(int studentId, int courseId)
        {
            var student = studentRepository.GetById(studentId);

            if (student == null)
            {
                return(NotFound("Student does not exist."));
            }

            var course = courseRepository.GetById(courseId);

            if (course == null)
            {
                return(NotFound("Course does not exist."));
            }

            var mark = marksRepository.GetMarksModel(studentId, courseId);

            if (mark == null)
            {
                return(NotFound("Mark does not exist."));
            }

            return(Ok(mark));
        }