Hi experts,
I just face another problem:
Imagine you have customers which are related to orders in a 1:n relationship (one customer can have multiple orders).
Let's say you already have a CustomerCollection "LotsOfCustomers".
What would be the best way to get an OrdersCollection "AllTheirOrders" that contains all orders for the customers given in "LotsOfCustomers"?
Is there a better approach than iterating through all customers like this this (pseudo-code)?
for each (CustomerEntity currentCustomer in LotsOfCustomers)
{
for each (OrdersEntity currentOrder in currentCustomers.Orders)
{
AllTheirOrders.Add(currentOrder);
}
}
Thanks for any help!
Ingmar