Adding a product controller

Finally, we have reached the stage where we can proceed to add our controller class. This controller would be actually responsible for responding to the incoming HTTP requests with the applicable HTTP response. You can now get rid of the ValueController class, as it is a default class provided by the ASP.NET core template, in case you are wondering what is to be done with that.

Right-click on the controllers folder, chose the Add ->New Item option, and select Web API Controller Class. Name it ProductController. Here we are going to utilize whatever code/functionality we can from the monolithic application. Go back to the legacy code and see the operations you're performing there; they can be borrowed for our

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.