EF4 save complex detached object graph?

It is not about refreshing. If you modify the graph in detached state EF is not able to find what changes you did. You must manually set the state of each modified entity or relation .

Attach will put whole graph in Unchanged state and ChangeObjectState affects only single entity in the graph.

Ladislav is correct. However, there is one more option that you should consider which would solve this problem and still allow you to retain the detatched model - self tracking POCOs. There's a T4 template (it's either bundled with VS2010 or is available as a download) which allows an object graph to track its state (this includes adding / removing objects into the graph as well as what properties with an object have changed) so that you can reattach the graph having made modifications; EF4 will figure out the changes and apply those to object state manager for you.

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