Skip to content

About

.NET, Frameworks (XAF & XPO), eXpress Persistent Objects

Topics

Resources

Stars

0 stars

Watchers

54 watching

Forks

Latest commit

 

History

52 Commits

Folders and files

Repository files navigation

Files to look at:

How to clone a persistent object

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?


Does This Example Address Your Development Requirements/Objectives?

(you will be redirected to DevExpress.com to submit your response)

About

.NET, Frameworks (XAF & XPO), eXpress Persistent Objects

Topics

Resources

Stars

0 stars

Watchers

54 watching

Forks

Releases

Packages

Used by

Contributors

Languages