I want to do a copy of an object without copying the ID and without doing it field by field.
Is there anyway?
I'm trying to do this way but I have an Exception:
The property 'ID' is part of the object's key information and cannot be modified.
Object o = getObject()
Object h = new Object();
h = o;
h.ID = 0;
db.Object.Add(h);
db.SaveChanges();