bclubb wrote:
Can you post what exactly you are wanting to do. A PK for an entity shouldn't be changed after it has been set.
Yes, I understand. However, I have a case when cloning graphs via serialization that I need to reset the PK id to null/unassigned, and don't want to have to do:
newEntity.Fields = new EntityFields(); // ..whatever the correct syntax is
for (int f = 0; f < newEntity.Fields.Count; f++)
if (!newEntity.Fields[f].IsPrimaryKey)
newEntity.Fields[f].CurrentValue = this.Fields[f].CurrentValue;