from aPaymentModelView in PaymentItems
from aPlacements in aPaymentmodelView
select aPlacements
this should work according to this
Flatten List in LINQ
EDIT
nicely provided by hazzik
var ids1 = (from model in models
from placement in model.Placements
select placement).ToList();
i guess i don't understand how it knows to concatenate the List<int>
s
if i select placement, and then ToList, i should get a List<List<int>>
EDIT 2
ok, so actaully the cross join
from aModel in Models
from aPlacement in aModel.Placements
produces a tuple of { Model, Placements }
but these tuples are implicity concatenated with each other and all you have to do is to exclude the outer label, the Model
EDIT 3 i suppose it cannot be considered a cross join, although it feels like one, but since the placements are already segregated into separate lists, it is really just a full breadth and depth tree traversal,
Which could only be accurately described by a M-soft-ism, SelectMany
i am getting this idea from the type reported by ToString for the var. It has type of SelectMany iterator.