private void FixupZone1(Zone previousValue, bool skipKeys = false) { if (IsDeserializing) { return; } if (previousValue != null && previousValue.ZoneAdminFeeValues1.Contains(this)) { previousValue.ZoneAdminFeeValues1.Remove(this); } if (Zone1 != null) { if (!Zone1.ZoneAdminFeeValues1.Contains(this)) { Zone1.ZoneAdminFeeValues1.Add(this); } ToId = Zone1.Id; } else if (!skipKeys) { ToId = null; } if (ChangeTracker.ChangeTrackingEnabled) { if (ChangeTracker.OriginalValues.ContainsKey("Zone1") && (ChangeTracker.OriginalValues["Zone1"] == Zone1)) { ChangeTracker.OriginalValues.Remove("Zone1"); } else { ChangeTracker.RecordOriginalValue("Zone1", previousValue); } if (Zone1 != null && !Zone1.ChangeTracker.ChangeTrackingEnabled) { Zone1.StartTracking(); } } }
private void FixupZone(Zone previousValue, bool skipKeys = false) { if (IsDeserializing) { return; } if (Zone != null) { ZoneId = Zone.Id; } else if (!skipKeys) { ZoneId = null; } if (ChangeTracker.ChangeTrackingEnabled) { if (ChangeTracker.OriginalValues.ContainsKey("Zone") && (ChangeTracker.OriginalValues["Zone"] == Zone)) { ChangeTracker.OriginalValues.Remove("Zone"); } else { ChangeTracker.RecordOriginalValue("Zone", previousValue); } if (Zone != null && !Zone.ChangeTracker.ChangeTrackingEnabled) { Zone.StartTracking(); } } }