From the course: .NET Microservices for Azure Developers

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Implementing the ManagementService class

Implementing the ManagementService class - Azure Tutorial

From the course: .NET Microservices for Azure Developers

Implementing the ManagementService class

- [Instructor] Keep in mind that in a microservices architectural style, service-to-service communication is acceptable, but should be minimized. That said, in this video, I'm going to create a new class named ManagementService, that uses an HTTP client object to communicate to the Management microservice. Okay, let's get started and add a new folder, and let's name it say, ExternalServices. And here I want to add a new class named ManagementService. And let's use the file scope namespace syntax. And then I need to specify the kind of object that I'm going to receive from the Management microservice. In other words, I need something to visualize the response that I'm getting from the ManagementService, particularly when I am querying for a pet. So let's create a new record and let's name it, say PetInfo. And this is going to have id and the Name and the Age and the BreedId. So this is actually the response that I get from the pets endpoint in the ManagementService. So here, let's…

Contents