From the course: Advanced Azure Microservices with .NET for Developers
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Solution: Implementing cross-cutting concerns - Azure Tutorial
From the course: Advanced Azure Microservices with .NET for Developers
Solution: Implementing cross-cutting concerns
(upbeat music) - [Instructor] Let's begin by implementing the health check for the HospitalDbContext object. So I need the Microsoft.Extensions.Diagnostics.HealthChecks .EntityFrameworkCore package reference that I have here in the pet microservice, so I'm going to copy that and I'm going to paste it right here. And in the Startup class, I'm going to write down below the AddCosmosDbCheck. I'm going to execute AddDbContextCheck, and I'm going to pass HospitalDbContext just like that. And as you might remember, the endpoint is health, so we're ready to test this. So here in the browser, let's navigate to health, and as you can see, this is returning Healthy because the HospitalDbContext is able to communicate to the database. Now let's implement the versioning. For that, I need another NuGet package, which is implemented here in the Rescue Query API, and this is the NuGet package that I'm going to use. Let's copy that and…