I'm currently studying about the entity framework, in particular the self-tracking entity generator and POCO entities. I have come across the term "object graph" a couple of times in my reading but no definition / explanation. What is an "object graph" in the context of the entity framework?
I think your root question has nothing to do with EF itself. An "object graph" is a data structure resident in memory of class instances. For example if you had:
public class Person
{
public string Name { get; set; }
public Person Manager { get; set; }
}
and a bunch of things in memory thusly:
Person monkey = new Person()
{
Name = "Me",
Manager = new Person()
{
Name = "CTO",
Manager = new Person()
{
Name = "Chairman",
}
}
};
You would have a Directed Graph that holds me, my boss, and his boss. Basically, we're talking about Data Structures 101.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With