As described in Ticket T1131164, DevExpress does not see the need of implementing Clone features in EF Core due to low demands. But, since EF now seems to be the preferred ORM architecture the situation has changed. I think, the ability of copying (or cloning) of objects and their substructures is urgently needed, to create new productive objects based on repository objects (and their substructures). The suggested workaround in Ticket T1131164 unfortunately seems only to be working for a single record without dependent structures.
Is there any other suggestion?
Regards,
Haiko
Hi,
No problem, I am sure you will have additional work :-)
For instance, you can expand Kloniraj function and use EF Core to go through all navigation properties, then use reflection to check for Aggregate attribute on those properties and clone those sub-objects automatically - if that is your common scenario.
I did not implement this, since I it is easier for me to handle those cases manually (because when I need to clone dependent objects I always have to do additional processing) than clear sub-objects for all other classes.
Regards,
Mario