I'm trying to do something like this:
List<FundEntity> entities = this.tFunds
.Select(f => new FundEntity() {
ID = f.fundID,
Name = f.name,
CapitalCalls = f.tCapitalCalls
.Select(cc => new CapitalCall() {
ID = cc.capitalCallID,
Description = cc.description,
FundEntity = // Should be the newly created Fund Entity object
}).ToList()
}).ToList();
I would like the each Capitalcall object to have a reference back to its FundEntity. Is this possible without creating a loop and setting each one manually?