Problem 1: Student Course Registration API
Problem Description
Develop a RESTful Web API to manage student course registrations in a university system. The
API should allow registering students and viewing registration details.
Entity: StudentRegistration
Property Data Type
StudentId int
StudentName string
Email string
CourseCode string
Semester int
RegistrationDate DateTime
API Documentation
1. Register a Student
Endpoint: POST /api/registrations
Validations (Mandatory using FluentValidation):
StudentName is required and must contain minimum 3 characters
Email is required and must be in a valid email format
CourseCode is required and must be exactly 6 characters
Semester must be between 1 and 8
RegistrationDate must not be a future date
Expected Response:
201 Createdfor valid input
400 Bad Request with validation messages for invalid input
2. Do Create all necessary APIs with proper validations.
Example:
Get All Registrations [Endpoint: GET /api/registrations]
Get Specific Registrations [Endpoint: GET /api/registrations/101]
Delete Registrations [Endpoint: DELETE /api/registrations/101]
Update Registrations [Endpoint: PUT /api/registrations/102]