entity framework - Repositories and getting new values for an aggregate entities / value objects -


i'm starting out ddd , have built repository pattern using ef code first far working well. have aggregate root call animal has entity called status.

now if need populate drop down list status objects, or need replace status object in animal new one. how should access status collection. in case status not aggregate root , has meaning association animal, have identity though.

should either create new repository status making aggregate root (it 1 of many such things might out of hand), or allow access status collection via animalrepository getstatusbyid or getallstatuses?

this same question equally apply value objects such color, breed, sex etc.

this sort of stuff i'd treat lookup/reference data; i've found answer useful in past: loading value object in list or dropdownlist, ddd

but i'd have separate repository.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -