Join data from two Lists into one object
- by Petr Mensik
I ran into following situation and I am wondering about best solution. Let's say I have List<Object1> and List<Object2>, these lists are result of two separated queries. Both of them have the same size and there is relationship 1:1 between elements in the lists based on ID. I know that best solution would be fetching data in one DB query but that's possible right now.
So my question is, what is the best way to join these lists into let's say List<Object3>?