EntityGraph.Synchronize without Requiring Matching Object Graphs

Feb 22, 2012 at 11:20 PM

Hi there,

I was just wonding if anyone has given any thought to how one would be to modify the synchronize method on the EntityGraph such that it also synchronizes adds and deletes.    It seems like it should be possible to:

  1. Compare the src and destination entitygraphs
  2. Determine those entitys that aren't present in the destination (but are in the source) and precreate an item in the destination object graph.
  3. Determine those items in the destination, but not in the source and remove those items from the destination object graph.

Once these steps are complete, then the source and destination entity object graphs would be consistent which means that the existing synchronize method would do the remainder of the work.

Does anyone have any thoughts on this?

Many thanks

Louis