Quantcast
Channel: entityframework Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1793

New Post: Complex type as ID

$
0
0

I don't see a usecase for both a navigational property and an FK property at the same time.

However, sometimes one don't want this big interconnected graph of entities.
One might want to model aggregate roots as separate graphs which doesn't allow navigation to other aggregate roots.

See what I call "aggregate documents" in this post http://rogeralsing.com/2009/11/08/two-flavors-of-ddd/

I use snapshots there, but those could in some cases be replaced with an FK id only if you don't need the extra data.
So in such case, the order might have a CustomerId property _only_  which I would like to be as the same type (CustomerId type for semantics) as the Id of the actual customer.

Maybe I don't make any sense at all :)

//Roger 


Viewing all articles
Browse latest Browse all 1793

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>