0

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 ?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Anil C
  • 1,045
  • 3
  • 16
  • 38

1 Answers1

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.

Community
  • 1
  • 1
Kumar
  • 997
  • 5
  • 8
  • 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