google-code-export / dataobjectsdotnet

Automatically exported from code.google.com/p/dataobjectsdotnet
0 stars 0 forks source link

An extension simplifying working with parent-children hierarchies #596

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Feature description:
1. Special Hierarchy data type for Parent property.
2. Frequently used methods like GetAllDescendants(), CountAllDescendants(), 
Level, etc. is not optimal using adjacency list, better to use materialized 
path or nested sets pattern.

What is the expected result?
New Attribute, Interface, anything else to use simple methods to work with 
hierarchical data.

Original issue reported on code.google.com by kl.v...@gmail.com on 5 Feb 2010 at 1:30

GoogleCodeExporter commented 9 years ago
I see this as an extension of existing functional:

public IHierarchyNode<TNode> : IEntity 
  where TNode: IHierarchyNode<TNode> // note sure if this will work ;)
{
  [Field]
  TNode Parent { get; }
}

+ a set of extension methods. As far as I can assume, nothing additional is 
necessary... 

So let's see - we'll try to add this to Extensions project after releasing v4.2.

Original comment by alex.yakunin on 5 Feb 2010 at 7:14

GoogleCodeExporter commented 9 years ago

Original comment by alex.yakunin on 5 Feb 2010 at 7:16

GoogleCodeExporter commented 9 years ago

Original comment by alexis.k...@gmail.com on 9 Feb 2010 at 1:58