Develop the Mock Service
Develop a mock service for saving data in-memory.
We'll cover the following
add
function
The mock service will interact with an in-memory custom database for saving the data which will be consumed by the mock user interface. We will begin with the “added” feature. We have a list of StudentDto
, and with every new entry one instance of StudentDto
that has a Student
and a mentor is added to the list. The enum oriented Singleton design pattern is used for the in-memory database implementation. The identifier field begins at one and increments by one for every new count.
Get hands-on with 1400+ tech skills courses.