title: MVC2.NET pass object from viewmodel to view and access it
body: <p>When working with Viewmodels from linq to sql I have an architectural problem.</p>
  
  <p>When you have an object from your db (let's say "person"), and you load it in your viewmodel. After this in your view, when you try to acces referenced classes (let's say a person has children object which is a different table in db, and a different datacontext object). You get a "cannot access disposed datacontext object (or something) which is logical, because you loaded your object and disposed the datacontext. for example:</p>
  
  <p>"object" ->foreach(Child child in Model.Person.Children.ToList()){}</p>
  
  <p>But how can you make it so that you can ("preload"?) the children or acces them without having to create a new datacontext, and reload the person in your View ?</p>