Entity Framework Complex Type vs Creating new Entity

后端 未结 3 1641
情歌与酒
情歌与酒 2021-02-05 02:45

I\'m reading about the Entity Framework 4.0 and I was wondering why should I create a complex type and not a new Entity (Table) and a relation between them?

3条回答
  •  天涯浪人
    2021-02-05 03:27

    Based on Domain Driven Design Concepts, Aggregate root could have one or more internal objects as its parts. In this case, Internal objects - inside the boundary of Aggregate Root - does not have any KEY. The parent key will be applied to them or somehow like this. Your answer returns to the benefit of keeping all Parts inside Aggregate root that makes your model more robust and much simpler.

提交回复
热议问题