I'm trying to figure out a way to accomplish the following and cannot
figure it out (or find an example online)

A Product can contain a collection of Products.
Each Product could belong to more than one collection.
The Product does not know about who contains it.
A Product that contains a collection can not be contained in a
collection (this is optional... I can always enforce through
the .AddSubProduct method).

For example, I have Products A-F.  Product E contains A & B. Product F
contains A, C & D.  Product E contains B & C.  So, the code would be
something like:

Product A = new Product;
Product B = new Product;
...
F.AddSubProduct(A);
F.AddSubProduct(C);
...
E.AddSubProduct(B);
E.AddSubProduct(C);
...
for each (Product p in F.SubProducts){
   ...
}

Any ideas on how to do this?  I think the backend would basically be
two tables... Product and SubProduct.  SubProduct would contains a
column for parent and child.  I just don't know how to map this...

Many thanks to any help,
Jamie
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to