I have a class structure like so:
Person Dogs (dog 1, dog 2, etc) Puppies (puppy A, puppy B, etc)
There is one person. He has 1..n dogs. Each dog has 1..n puppies.
I want a list of all the possible combination of puppies, taking 1 puppy from each dog. Eg:
dog 1 puppy A, dog 2 puppy A dog 1 puppy A, dog 2 puppy B dog 1 puppy B, dog 2 puppy A dog 1 puppy B, dog 2 puppy B
If it was in sql tables, i'd do something like the following to 'multiply' the tables:
select * from puppies a, puppies b where a.parent='dog1' and b.parent='dog2'
Is there some linq-ish way to do this kinda thing???
Thanks so much
0 answers
Hot tools Tags
Hot Questions
Popular tool
vc9-vc14 (32+64 bit) runtime library collection (link below)
Download the collection of runtime libraries required for phpStudy installation
VC9 32-bit
VC9 32-bit phpstudy integrated installation environment runtime library
PHP programmer toolbox full version
Programmer Toolbox v1.0 PHP Integrated Environment
VC11 32-bit
VC11 32-bit phpstudy integrated installation environment runtime library
SublimeText3 Chinese version
Chinese version, very easy to use
Hot Topics
20522
7
13634
4






