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 the CQRS pattern - Azure Tutorial
From the course: Advanced Azure Microservices with .NET for Developers
Solution: Implementing the CQRS pattern
(electronic music) - Okay, let me walk you through how I solved the challenge. The first thing that we're going to do is to create a new class here in the commands folder. Let's name it, set the date of birth, command. And this class has two properties. The first one is for the pet ID, let's name it ID. And the second one is for the date of birth itself. So this is going to be a date time date of birth, and we're done. Now, we need to modify the pet application service class because we need to handle the command somewhere. And this is the place. So I'm going to copy this method and let's change this type to set date of birth command. Of course, we need to restore this state from the repository. But that's okay. And instead of set color, we're going to execute set date of birth, and let's create a new pet date of birth objects. So date of birth, create, and we're going to pass the date of birth that…