All Questions
4 questions
0
votes
2
answers
103
views
Modeling value object when fields' existence depends on state of other fields
I am practicing tactical DDD and having trouble as exemplified below. Fundamentally, whether some fields of the value object should be nullable depends on another field of the same value object. ...
0
votes
3
answers
1k
views
ValueObjects exposing outside domain layer
As I learned from the DDD rules, you have to change the entity through the aggregate root.
However let's say we have a value object "Address".
Is it allowed to do in the AR:
(I've seen this ...
0
votes
1
answer
669
views
List of ValueObjects a valid thing?
Let's say we have an entity Customer which can have multiple email addresses.
We create a ValueObject "EmailAddress", upon creation it checks if the address is valid.
Is this concept valid ...
0
votes
2
answers
1k
views
Where should I put the initialization validation of a Value Object?
Hi I am making a Value Object.
public class Age
{
public Age(int age)
{
Value = age
}
public int Value { get; private set; }
}
I want to check ...