Are you asking how to load child objects? If so, you can download using the .Include method. Given the Person class and the PhoneNumber class, where Person has a PhoneNumber collection, you can do the following:
List<Person> People = db.People.Where(p => p.Name = "Henry") .Include("PhoneNumbers") .ToList();
Or you can do what is called explicit loading, where you load your objects, and call the .Load method for collections of child and related objects that you want to load. Typically, you do this when you donβt have LazyLoading (and LazyLoading is enabled by default in 4.0+, I donβt remember in previous versions).
No matter how you request and load them, you will have to detach the objects that you want to add to another context.
Here is a link to a pretty good MSDN article on entity loading .
source share