From the course: Expert Domain-Driven Design (DDD) Implementation in .NET

Unlock the full course today

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

Implementing behavior to record multiple vital sign readings

Implementing behavior to record multiple vital sign readings - .NET Tutorial

From the course: Expert Domain-Driven Design (DDD) Implementation in .NET

Implementing behavior to record multiple vital sign readings

- [Instructor] Sometimes vital signs are critical data during a vet consultation regardless of the pet's condition. So, in this video, we're going to create a new value object named Vital Signs. So let's go ahead and add a new class. Name it Vital Signs, and this has to be public record. And to expedite this process, I already created the code. You can see that this is very simple, since I'm not doing any kind of validation. However, I'll leave this value object as-is for now. If you want to add more validations, I'll leave that as an exercise for you. Alright, with that said, let's go back to the consultation class. So here I want to add another method, and let's name it Register Vital Signs. And this is going to receive an IEnumerable of vital signs. Just like this. I'm using an IEnumerable because the client of this domain model, in other words, the client application, could potentially have a biomedical device connected that continuously records temperature, heart rate or…

Contents