Develop the Mock Service

Develop a mock service for saving data in-memory.

We will not describe the management of Manuscript and Author objects because we have seen it many times in the previous chapters. We will only learn how to manage the link between the Manuscript and Author. The mock service will be incorporated with an in-memory custom database for saving the data, which will be used by the mock user interface. We will start with the add functionality.

add function

We have a list of ManuscriptAuthorDto. With every new record, one instance of ManuscriptAuthorDto that has a ManuscriptDto and an AuthorDto, is added to the list, along with the publisher. A Singleton design pattern by means of enum is exposed to the in-memory database application.

Get hands-on with 1400+ tech skills courses.