How dasunmahesha/student_registration_system_api works
Project type and purpose
• This is a .NET Web API (“StudentRegApi”) that exposes endpoints for managing students (CRUD operations) and a sample weather‐forecast endpoint.
• It uses Entity Framework Core (see DB/ and Migrations/) for data persistence in a relational database and integrates with AWS S3 (Services/S3Service.cs) for object storage.
File structure
• Controllers/ – HTTP entry points: StudentController.cs (+ WeatherForecastController.cs).
• Services/ – Business‐logic and integration code: e.g. S3Service.cs.
• DB/ – Data‐access layer: StudentDb.cs (inherits DbContext).
• Migrations/ – EF Core schema migrations.
• Models/ – Domain entities: Student, Parent.
• Program.cs & Properties/launchSettings.json – hosting, configuration.
• appsettings.json(.Development) – environment settings (DB connection string, S3 credentials, etc.).
Missing README insights
• Although README.md is empty, the folder names and .csproj reveal that all logic resides server‐side—no separate frontend.
• Configuration files imply use of ASP.NET Core’s built‐in dependency injection, logging, and environment‐based settings.
a. Main components
• API Layer (ASP.NET Core Controller endpoints)
• Business Logic Layer (Service classes)
• Data Access Layer (Entity Framework Core DbContext + Migrations)
• Relational Database (e.g., SQL Server or PostgreSQL)
• External Object Store (AWS S3)
• Configuration Provider (appsettings.json, environment variables)
• Hosting/Runtime (Kestrel/IIS in Program.cs)
b. Relationships & interactions
• HTTP requests → Controllers (API Layer)
• Controllers inject and call Services
• Services use DbContext to query/update Database
• S3Service (in Services/) calls AWS S3 SDK to upload/download objects
• Configuration Provider supplies connection strings & AWS credentials to Program.cs, Services, DbContext
c. Architectural patterns & principles
• Layered architecture (Presentation / Business / Data)
• Dependency Injection (built‐in ASP.NET Core DI container)
• Repository/Unit of Work patterns via EF Core DbContext
• Configuration per environment (appsettings.json + appsettings.Development.json)
d. Key technologies
• ASP.NET Core (Program.cs hosting, Controllers)
• Entity Framework Core (DB/StudentDb.cs + Migrations)
• AWS SDK for .NET (S3Service.cs)
• JSON configuration (appsettings.json)
Important notes
• Middleware or hosting concerns (e.g., Kestrel, Program.cs) if relevant to deployment.