Utwórz wszystkie możliwe kombinacje elementów na liście za pomocą Linq i C #
Mam tabelę kategorii:
Catid | Desciption
1 | Color
2 | Size
3 | Material
I tabela pozycji kategorii
Catid | Name
1 | Red
1 | Blue
1 | Green
2 | Small
2 | Med
2 l Large
3 | Cotton
3 | Silk
Muszę przejrzeć wszystkie elementy i wyświetlić je w takich etykietach jak:
Red Small Cotton
Red Small Silk
Red Med Cotton
Red Med Silk
Red Large Cotton
Red Large Silk
Blue Small Cotton
Blue Small Silk
Blue Med Cotton
Blue Med Silk
Blue Large Cotton
Blue Large Silk
Green Small Cotton
Green Small Silk
Green Med Cotton
Green Med Silk
Green Large Cotton
Green Large Silk
Uwaga: może być więcej lub mniej kategorii. To nie jest z góry określone.
Jakieś sugestie? Dziękuję Ci