You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a domain entity, Customer, with a collection of PhoneNumber entities. When I add a new customer, its data is saved but the phone numbers are not. I've tried making the phone number a value object and a full entity with the same result. The only way it works is if I explicitly loop over the phone numbers and call .Insert on its corresponding repository which I'd rather not do because I don't really want it to have its own repository. These are essentially value objects.
I notice in the code that .Insert is just changing the state of the customer entity which is probably what the phone numbers aren't saved. Which leads me to believe I have a misunderstanding of what I'm supposed to do in this case.
The text was updated successfully, but these errors were encountered:
I have a domain entity, Customer, with a collection of PhoneNumber entities. When I add a new customer, its data is saved but the phone numbers are not. I've tried making the phone number a value object and a full entity with the same result. The only way it works is if I explicitly loop over the phone numbers and call
.Insert
on its corresponding repository which I'd rather not do because I don't really want it to have its own repository. These are essentially value objects.I notice in the code that
.Insert
is just changing the state of the customer entity which is probably what the phone numbers aren't saved. Which leads me to believe I have a misunderstanding of what I'm supposed to do in this case.The text was updated successfully, but these errors were encountered: