Copy ObjectContext ?Hi,<br/>is it feasible to make a functioning copy an ObjectContext with its ObjectStateManager state and tracked entities, <br/>and if so, what is a good way to do this ?<br/><br/>Many thanks<br/>Graham© 2009 Microsoft Corporation. All rights reserved.Mon, 06 Jul 2009 06:33:29 Z06ecb926-a468-485e-a16c-62780a0efdaahttp://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/06ecb926-a468-485e-a16c-62780a0efdaa#06ecb926-a468-485e-a16c-62780a0efdaahttp://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/06ecb926-a468-485e-a16c-62780a0efdaa#06ecb926-a468-485e-a16c-62780a0efdaaGraham Hayhttp://social.msdn.microsoft.com/Profile/en-US/?user=Graham%20HayCopy ObjectContext ?Hi,<br/>is it feasible to make a functioning copy an ObjectContext with its ObjectStateManager state and tracked entities, <br/>and if so, what is a good way to do this ?<br/><br/>Many thanks<br/>GrahamFri, 03 Jul 2009 09:27:19 Z2009-07-03T09:27:19Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/06ecb926-a468-485e-a16c-62780a0efdaa#fdff1645-ea58-4693-b587-58c5bfbc448ehttp://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/06ecb926-a468-485e-a16c-62780a0efdaa#fdff1645-ea58-4693-b587-58c5bfbc448eDaniel Simmons - MSFThttp://social.msdn.microsoft.com/Profile/en-US/?user=Daniel%20Simmons%20-%20MSFTCopy ObjectContext ?It is possible to do this, but I wouldn't say that it's really feasible.  There's nothing in the box to do it.  If you wanted to write the code yourself, you would need to iterate over the information in the source ObjectStateManager and then recreate things in the target.  The trick is recreating the original values and such which is harder than it looks on the surface.<br/><br/>- Danny<hr class="sig">This posting is provided &quot;AS IS&quot; with no warranties, and confers no rights.Sat, 04 Jul 2009 07:42:35 Z2009-07-04T07:42:35Z