Thank you for your question.
The reason the original entity is updated when you are attaching the copy-entity is that DataAccess is able to recognize that this is the originally managed entity (it recognizes that this entity is related to a specific record in the database) and treats the changes made as updates on the original entity.
If you want to create a full copy of the original entity and add the copy-entity to the context in such a way that a new record is created in the database we recommend that you use the serialize/deserialize pattern. The idea is to decorate the persistent class(es) with the Serializable attribute and to implement the ISerializable interface. This process will wipe the relation between the entity and a specific record in the database and after that when you add it to the context it will treat it as a new record. For that you can use code similar to this one:
(var context =
Car car = context.GetAll<Car>().First(c => c.CarID == 1);
Car carCopy =
(MemoryStream serializationStream =
BinaryFormatter formatter =
serializationStream.Position = 0;
carCopy = (Car)formatter.Deserialize(serializationStream);
"Copy - "
The main thing you need to determine is which part of the entity tree you want to full copy and which part you want to reuse. More specifically you need to determine what you want to do with the reference properties and the collections. For example if you want to make a full copy of the "Addresses" collection you can make a detached copy like you are currently doing (with the "Addresses" collection) and then serialize/deserialize the detached copy. On the other hand if you want the copy-entity to point to the same Addresses as the original entity, you will need to populate the "Addresses" collection of the deserialized-copy with a loop from the original entity.