Our first ViewModel

Now that we have a clear vision of the request/response flow and its main actors, we can start building something. Our client doesn't even exist yet, but we can easily guess what we need to build it up--a set of CRUD methods for each one of the entries we identified early.

If we already used ASP.NET MVC at least once, we already know that the most straightforward way to do that is to create a dedicated Controller for each entry type. However, before adding each one of them, it can be wise to create the corresponding ViewModel so that it can handle the entry data in a strongly-typed fashion.

Get ASP.NET Core 2 and Angular 5 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.