Develop the Mock Service

Develop a mock service for saving data in-memory.

add function

The mock service will network with an in-memory convention database to save the data which will be consumed by the mock user interface. We will initially see the additional functionality. We have a list of PersonDto and with every new instance, one instance of PersonDto that has a Person and phone number is added to the list. A Singleton design pattern using enum is followed for the in-memory database execution. The identifier field starts at one and advances by one for every new entry.

Get hands-on with 1200+ tech skills courses.