How to copy a whole entity without using clone operator?

Posted by suvetha s on 02-Jan-2017 01:09

example:

I have an entity like "employee" with attributes name, employee ID and email ID.

here I have to copy the whole entity in another entity without using clone or collection and I have to perform operations on the another entity. The operation should not affect the original entity.

All Replies

Posted by mparish on 02-Jan-2017 03:34

Try something like this
If there are multiple “old” employees then you will get multiple copies.
You will also need some way to distinguish this newly created Employee from the original if you want to perform operations on it later.
 

This thread is closed