Is there a shorter way to overwrite properties of an original entity object to a current entity obje
        Posted  
        
            by Jronny
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Jronny
        
        
        
        Published on 2010-05-31T05:33:47Z
        Indexed on 
            2010/05/31
            5:52 UTC
        
        
        Read the original article
        Hit count: 527
        
entity-framework
|c#4.0
For example, I have:
originalItem.Property1 = currentItem.Property1;
originalItem.Property2 = currentItem.Property2;
originalItem.Property3 = currentItem.Property3;
originalItem.Property4 = currentItem.Property4;
The properties will also change if the currentItem's property's value is different from that of originalItem's.
Any shortcuts here? Thanks.
© Stack Overflow or respective owner