Loading a Value object in List or DropdownList, DDD

前端 未结 4 790
春和景丽
春和景丽 2020-12-05 08:55

I need to clarify something.

Have Person Aggreagate , 2 VOs (Country, StateProvince).

I want to load all country in my presentation layer (i am using mvc)

4条回答
  •  余生分开走
    2020-12-05 09:35

    Evans also says (pg 170) "An entity as basic as Location may be used by many objects for many reasons..."

    I would also consider making Country an entity for the reasons given above. Perhaps more importantly, it is a low level object. You probably are also even supplying Country by configuration rather than through any actual domain activities. Therefore I would remove it from the Person and make it a standalone entity.

    Also for this type of object you may not really need a dedicated repository, consider creating a single lookup service that provides query access for a group of similar objects of this nature.

提交回复
热议问题