Hi,
Is anyone aware of a C# library that provide a means to manage a Web like map of items, which each item can have relationships to other items in the collection/table. As an example an implementation of this with a datastore might see the schema looking like the below. Picture a page with node objects scattered across it with lines going between them in a non-hierachal sense, with the lines have one arrow head (implying the parent-child relationship). So a node can have multiple parents, and multiple children.
> Table: Nodes
> - ID
> - Description
> - etc
>
> Table: Relationships
> - ParentNodeID
> - ChildNodeID
The library would have API methods such as:
- AddParent(parent)
- AddChild(child, parent)
- GetChildren(item)
- GetRootParent(item)
- Delete(item)
- etc
As an example of the complexity, the "Delete(item)" method would need to "walk the tree" so to speak and have the smarts to know which nodes it can delete depending on whether that node itself actually has another parent item somewhere which it references.
Ideally the library would support ADO.net for persisting it to database (in fact I'm using SQLite).
Anyone come across such a library?
Thanks