From the course: .NET Microservices for Azure Developers
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Implementing the ClinicApplicationService class - Azure Tutorial
From the course: .NET Microservices for Azure Developers
Implementing the ClinicApplicationService class
- [Instructor] I could inject both the management service and the ClinicDbContext directly into the consultation controller class. However, to maintain a clean and organized controller, we'll create a new class named clinic application service instead. So first, let's create a new folder, and let's name it Application. And the class is going to be ClinicApplicationService. So here, I want to inject ClinicDbContext and the managementService objects. So now, let's use the file scope namespace syntax, of course, and let's implement a new method for handling the start consultation command. So let's do the following, public async and Handle. And this is going to handle the StartConsultationCommand. And this is going to return a new consultation object just to keep it simple, and let's do the following. So I know for sure that the managementService is going to return a new PetInfo object. So I'm going to pass command.Id, in other words, a patient ID. And of course, I need to await for this.…
Contents
-
-
-
-
-
-
-
(Locked)
Creating the Clinic microservice2m 44s
-
(Locked)
Adding the ClinicDbContext class3m 44s
-
(Locked)
Implementing the ManagementService class5m 41s
-
(Locked)
Implementing the ClinicApplicationService class6m 35s
-
(Locked)
Adding resilience traits to the microservice using Polly3m 20s
-
(Locked)
Creating the Container App for the Clinic microservice1m 2s
-
(Locked)
Creating the Dockerfile and modifying the workflow3m 17s
-
(Locked)
Adding environment variables to the Clinic microservice4m 41s
-
(Locked)
Challenge: Implementing a new endpoint and memory cache1m 30s
-
(Locked)
Solution: Implement a new endpoint and memory cache2m 41s
-
(Locked)
-