.NET Microservices for Azure Developers
1h 47mIntermediate2024-09-11
Authors

Rodrigo Díaz Concha
Solutions Architect, Microsoft Regional Director, and Microsoft MVP
Course details
It's no longer only architects who need to understand the benefits and challenges of cloud-native architectures, such as microservices. By leveraging this popular architectural pattern, developers and other key application stakeholders can enhance the availability, reliability, and scalability of their software solutions. In this course, instructor Rodrigo Díaz Concha provides an overview of microservices, as well as how to use .NET to create microservices that can be deployed in Azure. Rodrigo covers key topics such as microservices pros and cons, writing unit tests, microservices containerization with Docker, microservices deployment on top of an orchestrator, and synchronous communication between microservices.
Skills covered
Software ArchitectureDevOps ToolsDevOpsAzurePersonaCloud ServicesCloud ComputingMicrosoftSoftware Development
Concepts
Introduction
- Making sense of microservices architecture in a .NET and Azure ecosystem
- What you should know
- What we are going to build
Introduction to Microservices
- The importance of software architecture
- What is the monolithic architecture
- Service-oriented architecture (SOA) overview
- Introduction to the microservices architectural style
- Core principles of microservices
- Microservices and Domain-Driven Design
- Communication between microservices
Hands On - Creating Microservices with ASP.NET Core
- Creating and cloning the repo
- Creating your first microservice using ASP.NET Core
- Creating and registering the DbContext for the microservice
- Creating the PetsController and returning the list of pets
- Obtaining a single pet in the PetsController
- Creating a new pet
- Challenge - Implementing BreedsController and validations
- Solution - Implementing BreedsController and validations
Hands On - Microservices Containerization with Docker and Azure Container Registry
- Creating the service principal and configuring the repo
- Creating a workflow to log into Azure
- Creating the Azure Container Registry resource
- Creating the Dockerfile in Visual Studio
- Modifying the workflow to create the container images
- Challenge - Formatting the container image tags
- Solution - Formatting the container image tags
Hands On - Microservices Deployment in Azure Container Apps
- Creating the Container Apps environment using the Azure CLI
- Creating the Container App using the Azure CLI
- Modifying the workflow to deploy to the Container App
- Challenge - Configuring environment variables
- Solution - Configuring environment variables
Hands On - Synchronous Communication between Microservices
- Creating the Clinic microservice
- Adding the ClinicDbContext class
- Implementing the ManagementService class
- Implementing the ClinicApplicationService class
- Adding resilience traits to the microservice using Polly
- Creating the Container App for the Clinic microservice
- Creating the Dockerfile and modifying the workflow
- Adding environment variables to the Clinic microservice
- Challenge - Implementing a new endpoint and memory cache
- Solution - Implement a new endpoint and memory cache
Conclusion
- Next steps with .NET microservices