Web Development .
NET
T ra ining Ex a m
Document Code 25e-BM/HR/HDCV/FSOFT
Version 1.1
Effective Date 20/11/2012
Hanoi, 08/2024
Training Exams Entity Framework Core Issue/Revision: 0/1
RECORD OF CHANGES
No Effective Date Change Description Reason Reviewer Approver
1 8/May/2025 Create new a exam Add HieuHT24 HieuHT24
25e-BM/HR/HDCV/FSOFT v1.1 Internal use 2/5
Training Exams Entity Framework Core Issue/Revision: 0/1
Contents
General Requirements ....................................................................................................................................... 4
Problem 01. Design and Build Web API (75 minutes) ....................................................................................... 5
Problem 02. Build ASP.NET Core MVC to Call Web API (105 minutes)........................................................... 5
25e-BM/HR/HDCV/FSOFT v1.1 Internal use 3/5
Training Exams Entity Framework Core Issue/Revision: 0/1
CODE : CPL.FUKS.WDN.Practice.T02
TYPE : Long
LOC : n/a
DURATION : 180 minutes
General Requirements
Require 01: Working tools and Delivery requirements
• Working tools: Visual Studio 2022 or higher.
• Delivery: Source code and test results in a compressed archive.
Require 02: Technologies
The product illustrates:
• C# Programming Language.
• Object Oriented Programming paradigm
• String, DateTime, Generic, and Collections, Exception
• LINQ, Coding convention
• Entity Framework Core
• Web API
• Web MVC
Require 03: Technical Requirements
• Use StartCode solution to put your code in marked labels.
• Use Object-Oriented programming style.
• Apply the naming and coding convention.
• Remember to comment on each class, method, and attribute (if needed).
• Clean source code and project before release
Mark scale:
• Problem 01: 4 marks
• Problem 02: 6 marks
25e-BM/HR/HDCV/FSOFT v1.1 Internal use 4/5
Training Exams Entity Framework Core Issue/Revision: 0/1
Problem 01. Design and Build Web API (75 minutes)
Requirements:
Create a Web API to manage Student Information. Each Student has the following structure:
• StudentId: int, Primary key, auto-increment (Identity in SQL Server).
• FullName: nvarchar(150), Required, max 150 characters.
• DateOfBirth: DateTime, Required, must be a valid past date.
• Email: nvarchar(100), Required, valid email, max 100 characters.
• PhoneNumber: nvarchar(20), Optional, max 20 characters.
• Address: nvarchar(250), Optional, max 250 characters.
Main API Endpoints:
• GET /api/students: Retrieve all students.
• GET /api/students/{id}: Retrieve detailed information of a student.
• POST /api/students: Add a new student (StudentId auto-generated).
• PUT /api/students/{id}: Update a student's information.
• DELETE /api/students/{id}: Delete a student.
Problem 02. Build ASP.NET Core MVC to Call Web API (105 minutes)
Requirements:
Create an ASP.NET Core MVC app that supports CRUD for Students:
• Student List Page:
o List all students from the Web API.
o Options to View Details, Edit, or Delete.
• Student Details Page:
o Show detailed information by StudentId.
o Button to return to list or edit.
• Add New Student Page:
o Form to enter student details.
o Submit POST request to Web API.
• Update Student Page:
o Form to edit existing student information.
o Submit PUT request to Web API.
• Confirm Delete Student Page:
o Show student information.
o Ask for confirmation before sending DELETE request.
Additional Requirements:
• Use HttpClient or an equivalent library to call Web API endpoints.
• Error Handling: Provide user-friendly error messages if the API returns errors or if there are
connectivity issues.
• Data Validation: Ensure all data entered by the user is validated before sending it to the API.
Submission: Zip the entire solution (Name_CPL.FUKS.WDN.Practice.T02.zip) and submit it to the
exam.
-- THE END --
25e-BM/HR/HDCV/FSOFT v1.1 Internal use 5/5