I’m working on EF on a project. Recently, thanks to Slauma and Mark Oreta, I have solved my not being able to reach the object relations and getting error The ObjectContext instance has been disposed and can no longer be used for operations that require a connection. The detailed post is here.
I have a very similar problem and could not solved it with INCLUDE. I would like to reach the relation’s relation over PRODUCT entity. I don’t know if this is possible but I can reach it when I debug and INSIDE using (var Context = base.Entities). But how about outside this block? Here is the code.
using (var Context = base.Entities)
{
return Context.Product
.Include("Product_Attribute")
.Include("Product_AttributeType")
.Include("Product_AttributeType_Title")
.Include("Product_AttributeValueUnit")
}
I CAN reach the Product_Attribute entity outside, but when I try to get other entities OF Product_Attribute thats when I get
A specified Include path is not valid. The EntityType
‘NoxonModel.Product’ does not declare a navigation property with the
name ‘Product_AttributeType’
The error makes sense in fact. How do I solve it and get the PRODUCT entity outside of the block and still be able to reach the other related tables?
And here is the database, and thank you very much in advance:

You can eager load the navigational properties by providing the navigational property names separated by a
..