I'm wanting to deep clone and then save the new new entities like so however the foreign key PropertyId on PropertyInfo should be altered to reference the newly created Property - Is there a convenient approach to do achieve this?
The reported duplicate question does not address my problem, it answers how to deep clone an entity but not how to update the FK on an associated entity.
var originalEntity = Context.Property.Include("PropertyInfo")
.AsNoTracking()
.FirstOrDefault(e => e.Id == 1);
Context.Properties.Add(originalEntity);