From the course: Azure Microservices with .NET Core for Developers
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Invoking the products microservice from search - Azure Tutorial
From the course: Azure Microservices with .NET Core for Developers
Invoking the products microservice from search
- [Instructor] We already implemented the communication to the orders microservice. Let's go ahead and implement the communication to the products microservice. So the first thing that I want to do is to open the starter file because we need to configure the HttpClient object that we're going to use to communicate to the ProductsService. Let's execute HttpClient ProductsService. And let's set the BaseAddress property to the Configuration that we have inside the app settings JSON file. Great, now let's add a new model class inside the Models folder. This class will be named Product and this is quite different from the one that we have in the Products project because we only need the Id and the Name and that's it. We don't need anything else. Now let's add a new interface inside the Interfaces folder named IProductsService. Here I'm going to implement the GetProductsAsync method. This method will return a tuple with…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Preparing and implementing the search service8m 43s
-
(Locked)
Invoking the orders microservice from search9m 59s
-
(Locked)
Invoking the products microservice from search8m 16s
-
(Locked)
Add resiliency to the products microservice with Polly4m 8s
-
(Locked)
Challenge: Synchronous communication to the customers microservice1m 14s
-
(Locked)
Solution: Synchronous communication to the customers microservice2m 47s
-
-
-
-
-