In this I will demonstrating how to create a copy of the Row with all the related child rows in Entity object .By Using this implementation you can able copy the entire entity object with mere 2 line of code without any looping .
At first, I thought of pulling the item, manually copying each property, and inserting .I found that may bit complex .Then I Binged for some idea and found of using serialization/deserialization for cloning the object .This logic basically will do deep copy of object. With this logic and some reflection and LINQ I can able to meet my requirement by creating extension method on entity objects.
Check Here for Logic and Implementation
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment