Deep copy objects from different namespaces
        Posted  
        
            by Wasim
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Wasim
        
        
        
        Published on 2010-05-13T06:26:18Z
        Indexed on 
            2010/05/13
            6:34 UTC
        
        
        Read the original article
        Hit count: 359
        
Hi all, I have the following situation: I have class User with the follwing properies :
public class User
{
 string user name ;
 List <Contact> contacts ;
 List <BookMark> book marks;
 .
 .
 .
}
I have the same class in a different namespace , with some different properties . BWT , it's the same situation of it's classes (Contact) and (BookMark). I need to make a deep copy of the same properties from the two classes .
Actually , I arrive to this situation by having an Entity Framework edmx file . I created the first database (SQL server 2008) from this model . And copied he same edmx file to another project and created the database with SQL CE db. Now I get the first data model objects by WCF service and need to persist them in the local database in my application . The objects are the same but there are some changs because of the modeling issue with a different databse. Do you have any workarround about this assue.
Thanks in advance ...
© Stack Overflow or respective owner