Hi all,
I am trying to do a deep copy of a NHibernate object (proxy wrapper). I want to do a copy of lazily loaded things also, except the Id
of each inner object of the parent object, as it should be generated when I save the new object which is the result of deep copy.
I have tried to use serialization and also tried using AutoMapper (I know, its not meant for this, just gave it a try). Both didn't yield what I want.
I am thinking of manually copying each and every property as the last option, if there is no better way to do it.
I found this question, but it didn't address what I wanted, considering I was reluctant to do the copy manually.
Any suggestions on how to go about it would be really appreciated.
Thanks