I have an Entity A which is related to entity B on a 1:M relationship. B is related to C in a 1:M relationship.
A --> B
B --> C
How do I go about including the collection of C when I include B on A?
I have this:
return (from d in _contextProvider.GetContext<SomeContext>().GetObjectQuery<A>().Include("B") select d).SingleOrDefault(); I tried this but throws error because it thinks C is related to A and can't find the relationship.
return (from d in _contextProvider.GetContext<SomeContext>().GetObjectQuery<A> ().Include("B").Include("C") select d).SingleOrDefault();