Vibrant discussion about CSLA .NET and using the framework to build great business applications.
In CSLA.NET, Is a good idea, or proper approach, to use self-referencing hierarchy from one data-table to build object graph (Parent-Child)?
Hi TF Zheng,
CSLA.NET offers no direct support for hierarchical data.
One of the approaches is to use a ReadOnly (root) collection where the ReadOnly child objects have a ParentID property. The hierarchy concept is moved out of business objects to UI. That might not be the best approach since the hierarchy is indeed a business concept.
Tiago Freitas Leal, CslaGenFork (Open Source CSLA code generator)
Each level of my hierarchical data is an editable list of business object with many properties. At least we have four levels in hierarchy. There are two approaches:
One approach is: Each level of business object maps to a data-table. Then, use "Has relation/Forieign-Key" to establish hierarchical object graph/view.
The another approach is: use self-referenceing table of hierarchy.
My question is: which approach is the best if we we use CSLA.NET together with Entity Framework?
Thanks for any suggestions...