Skip to content

pawan-pathak12/Student-Course-Management-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Student Course Management API

Student Course Management API – Enrollment Service

📋 Features in Current Enrollment System

🎯 Enrollment Management

  • Enroll a Student
    • Validates that the student exists
    • Validates that the course exists and is active
    • Checks if the course has available seats
    • Prevents duplicate enrollment for the same student and course
    • (Insert into DB pending)
  • Cancel an Enrollment
    • Soft-deletes an enrollment by setting IsActive = false

🔍 Validation & Checks (Internal Logic)

  • IsStudentExistsAsync → Confirms the student ID exists in the Students table
  • IsCourseExistsAsync → Confirms the course ID exists and is active in the Courses table
  • IsAlreadyEnrolledAsync → Ensures the student is not already actively enrolled in the course
  • IsEnrollmentVacancyOpenAsync → Combines course existence and capacity checks to determine if enrollment is possible

📅 Enrollment Date Validation

-- ** IsEnrollmentDateValidAsync → Confirms EnrollmentDate is between Course EnrollmentStartTime and EndTime

📊 Course Capacity Logic

  • GetCapacityOfCourseAsync → Retrieves the maximum allowed number of students for a course
  • GetNumberOfStudentsInCourseAsync → Counts active enrollments in a course
  • Vacancy Check → Returns true only if the course exists and has available seats

Releases

No releases published

Packages

No packages published

Languages