Skip to content

Children of aggregate root when get it from database #139

Answered by kgrzybek
sbolum asked this question in General
Discussion options

You must be logged in to vote

Hi @sbolum

Each collection and complex type is mapped using Owned Entity Types. It means that always everything is loaded using eager loading technique:

EF Core allows you to model entity types that can only ever appear on navigation properties of other entity types. These are called owned entity types. The entity containing an owned entity type is its owner.

Owned entities are essentially a part of the owner and cannot exist without it, they are conceptually similar to aggregates. This means that the owned entity is by definition on the dependent side of the relationship with the owner.

Please check it here:

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@sbolum
Comment options

@kgrzybek
Comment options

Answer selected by sbolum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants