locked
Entity Framework LoadProperty with Filter RRS feed

  • Question

  • Hello,

      I am working on Entity Framework and I have question on the LoadProperty of the context. I am loading my parent entity and trying to load the navigation property through the context.loadproperty as the include is giving me a time out exception as there is a lot of data in the database and also I need to load lot of child entities. So i was using the LoadProperty which is fairly quick but the only problem i have in using this approach is that I cannot filter the data that needs to be loaded. Can anyone please suggest me better approach or if there is a possibility to include the filter with the LoadProperty.

    Thanks,
    Ajay.

    Wednesday, December 14, 2011 8:01 PM

Answers

  • Do a linq query which does the filtering you need and send out DTO (data transfer object) of the results.


    William Wegerson (www.OmegaCoder.Com)
    • Marked as answer by Lie You Tuesday, December 20, 2011 3:31 AM
    Thursday, December 15, 2011 1:18 AM