Adding the model

In our monolithic application, we do not have any model classes yet. So let's go ahead and add a new model as required. To add the new model, follow these simple steps:

  • First, add a new folder and name it Models. In Solution Explorer, right-click on project and then click on chose options from Add | New Folder:

There is no hard and fast rule about putting all the model classes in a folder named Models. As a matter of fact, we can put our model classes anywhere in the project in our application. We follow this practice as it becomes self-explanatory from folder names. At the same time, it easily identifies that this folder ...

Get Building Microservices with .NET Core now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.