Is there a specific reason that the DynamicListBase doesn't have a "Parent" property or is it a bug?
A DynamicListBase is by definition a parent object that automatically saves it's "root" objects contained in the list. It makes no sense to have a parent property on this list.
To me, the Parent is the object that hosts the object; it doesn't have anything to do with the steriotype.
The way CSLA thinks about a "Parent" is not simply an object reference - it is a real parent-child relationship (also known as containment).
DynamicListBase implements aggregation, not containment, and so the Parent property would be misleading.
What is the scenario where your root object needs to know that it was loaded as part of a collection?
I have a "getter" object at the root which holds all my lists (product types, codes, etc.) and my business object root as I load everything I need up front in Silverlight when I open a new view. The business object is a dynamic list of root business objects. I lazy load another list on the business object when selected in the UI through data binding. I need access to the list of product types in the "getter" object in order to pass it into the data portal through a criteria object. Typicaly I reference the Parent object to get to the root "getter" object that has my lists on it. I also sometimes need access to the "getter" object in business rules where I only have a refernece to the target and not the "getter" object. I have been using the DynamicListBase for an interface simular to Billy Hollis's Temp Agency demo application. By having the business objects referenced on the main form for the module, I can tell if they are new, dirty, etc. even though they are actually being edited in another viewmodel/view.
Copyright (c) Marimer LLC