Integrating APIs with the service layer
In this section, we will be developing the Packt.Ecommerce.Web
ASP.NET Core MVC application, which is created by adding the ASP.NET Core web application(Model-View-Controller)
template. As we have already developed various APIs needed for the presentation layer, we will first build a wrapper class that will be used to communicate with these APIs.
This is a single wrapper class that will be used to communicate with various APIs, so let's create the contract for this class.
For simplicity, we will limit the requirements to the most important workflow in our e-commerce application, and that will be as follows:
- The landing page, which retrieves all products in the system and allows users to search/filter the products.
- View the details of the products, add to the cart, and the ability to add more products to the cart.
- Complete the order and see the invoice.
To follow a more structured approach, we will segregate...