Filtering a graph of entity framework objects?

Imagine you have a person with 100 orders. Now you filter those orders down to 10. Finally you select the person who has those orders.

Guess what? The person still has 100 orders!

I am not exactly sure what your question is but the following might be helpful. In entity framework if you want to load an object graph and filter the children then you might first do a query for the child objects and enumerate it (i.e. Call ToList()) so the childern will be fetched in memory.

And then when you fetch the parent objects (and do not use . Include) enitity framework will able to construct the graph on its own (but note that you might have to disable lazy loading first or it will take long to load). Here is an example (assuming your context is "db").

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions