This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Does LS have a way to enforce the Domain Driven Design concept of "Aggregate Roots" ? For example, I have a "Customer" Entity which holds a reference to one or more "PostalAddress" Entities. The "PostalAddress" Entities should only be accessible (load, edit, etc) through the Customer Entity (by using methods/properties on the Customer class). There would be no need to allow any code outside of the Customer Entity/Class to be able to add/remove PostalAddress Entities to the UoW, since the Customer Entity will be solely responsible for managing the PostalAddress Entities. Is this possible to enforce in LS? |
|
|
No, it's not possible at the LightSpeed level. Obviously, you can create your own repository interface to encapsulate the raw unit of work, and not provide methods for directly loading or adding PostalAddress entities -- but you'd have to write this yourself. |
|