How to create Deep Clone from objects returned via Entity Framework ? The source object also have some other collections associated with it. In other words, how to clone an entity returned from Entity Framework ?
Asked
Active
Viewed 5,545 times
0
-
As any ohter objects: http://stackoverflow.com/questions/1251277/net-deep-cloning-what-is-the-best-way-to-do-that – Ladislav Mrnka Mar 09 '11 at 17:31
1 Answers
0
Just like how we deep clone any other objects. You need override the clone on source object and provide a implementation by copying each memberwise.
-
There are various other approaches to it, refer this - http://stackoverflow.com/questions/129389/how-do-you-do-a-deep-copy-an-object-in-net-c-specifically – Kumar Mar 09 '11 at 17:41