In entity framework, the DbContext class implements IObjectContextAdapter interface. When I look inside this interface I see there's only one property
ObjectContext ObjectContext {get;}
But DbContext class itself doesn't have that property. Now:
- How does it work? Shouldn't compiler force the DbContext class to have public ObjectContext property?
- Or put it another way: Why do I have to cast DbContext to ObjectContextAdapter to get access to ObjectContext property.
What's going on here?