EF 4.1 Explicit Loading related entities with a string navigation property RRS feed

  • Question

  • Hi

    I did test EF 4.1 new functionality to explicit load navigation properties with new .collection("navigation property").Load() functionality like described here:

    This all works fine as long as I use a string only with 1 Navigation property like "ContactPersons".

    If I try to do use it with "ContactPersons.ContactPersonsContactFacilities" then I get an error message:

    "The property path 'ContactPersons.ContactPersonsContactFacilities' cannot be used for navigation properties. Property paths can only be used to access primitive or complex properties."

    Is this not working the same way as the .include works?

    Is there some way to do it? I would like to pass a string with my navigation property to the load method.




    Beat Wuethrich
    Thursday, June 16, 2011 7:16 AM


  • Hi Beat,

    Thanks for your feedback.

    I mean you couldn't pass in a path string in the collection method to load all related entities like Include method.

    Thanks for understanding.

    Have a nice day.

    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, June 20, 2011 9:09 AM

All replies