Files to look at:
- CloneHelper.cs (VB: CloneHelper.vb)
- Form1.cs (VB: Form1.vb)
- ObjectClass.cs (VB: ObjectClass.vb)
Scenario
In this example, we create a CloneHelper class that will be used to clone the provided persistent object.
Steps to implement
1. Implement the CloneHelper class as shown in the CloneHelper.xx file. This class uses persistent object metadata to create a copy of the provided persistent object.
The Clone method has several overloads that allow you to determine whether object synchronization is required or not. If the synchronize parameter is set to true, reference properties are cloned only if the referenced object does not exist in the target Session. Otherwise, the existing object will be reused.
2. Create a Form that will use the ListBox control to display the result of creating and cloning persistent objects. See the code of the Form class in the Form1.xx file.
As a result, the following output will be shown:

See also:
How to get a list of a persistent object's properties
Should I use XPO to transfer data between databases?
(you will be redirected to DevExpress.com to submit your response)