The blog post I read seems to indicate that for objects the values ββare referenced by objects in the domain design, and the follow-up explains how to do this in NHibernate.
I would like to do the same with Entity Framework 4.1: in particular, have a complex type of reference to another object. As an example, consider this: I have an object, say, an Invoice that has the Total property of the Currency type. A currency is a complex type containing a decimal property called Value and a Unit property of CurrencyUnit type, CurrencyUnit is a "reference data object". That is, CurrencyUnit in this particular domain is an entity, not an object of value.
Now, perhaps "allowed" in DDD, this is not my preference; I do not want to discuss virtues. I am interested in learning if EF has a code solution to handle this scenario. I cannot find anything that is odd, since complex types are mapped to their entity containing a table, which, of course, can have foreign key references.
source share