If this is a parent -> child relationship between GameSectionVM
and ReleaseInfoVM
, then the easiest way to do this would be to add an ICollection<ReleaseInfoVM>
to the properties of GameSectionVM
.
public class GameSectionVM
{
...
public ICollection<ReleaseInfoVM> ReleaseInfos {get;set;}
}
code to fill the VM:
// this var will evaluate to GameSectionVM
var model = (from s in db.Sections
...
}).Single();
model.ReleaseInfos = (from r in db.Releases
...
// Do your query logic to populate the ReleaseInfoVM tables here
);