Page 1 of 1

How to clone one object?

Posted: Wed 30 Jan 2013 09:51
by software931
I have for example an Entity object CAR.

The key is CAR.PlateNumber

Now I want clone this object and all attributes, except the PlateNumber.
But I don't like to assign all attributes separately. Like
NewCar.color = oldCar.color, .....

Is there a Clone function available?

Re: How to clone one object?

Posted: Fri 01 Feb 2013 12:52
by Shalex
Please open your *.edml model, navigate to VS > Tools > Entity Developer > Model Explorer, select your template and set its Implement Cloneable property to True. As a result, each entity class will implement the ICloneable interface.