CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Is a good idea to use self-referencing hierarchy in CSLA.NET?

rated by 0 users
Not Answered This post has 0 verified answers | 3 Replies | 2 Followers

Not Ranked
6 Posts
TF Zheng posted on Sun, Apr 1 2012 10:59 AM

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)?

All Replies

Top 25 Contributor
450 Posts

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)

Not Ranked
6 Posts

Friend,

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...

TF Zheng

Not Ranked
6 Posts

Friend,

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...

TF Zheng

Page 1 of 1 (4 items) | RSS

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems