private void Fixupaspnet_Users(aspnet_Users previousValue, bool skipKeys = false) { if (IsDeserializing) { return; } if (previousValue != null && previousValue.aspnet_PersonalizationPerUser.Contains(this)) { previousValue.aspnet_PersonalizationPerUser.Remove(this); } if (aspnet_Users != null) { if (!aspnet_Users.aspnet_PersonalizationPerUser.Contains(this)) { aspnet_Users.aspnet_PersonalizationPerUser.Add(this); } UserId = aspnet_Users.UserId; } else if (!skipKeys) { UserId = null; } if (ChangeTracker.ChangeTrackingEnabled) { if (ChangeTracker.OriginalValues.ContainsKey("aspnet_Users") && (ChangeTracker.OriginalValues["aspnet_Users"] == aspnet_Users)) { ChangeTracker.OriginalValues.Remove("aspnet_Users"); } else { ChangeTracker.RecordOriginalValue("aspnet_Users", previousValue); } if (aspnet_Users != null && !aspnet_Users.ChangeTracker.ChangeTrackingEnabled) { aspnet_Users.StartTracking(); } } }
private void Fixupaspnet_Users(aspnet_Users previousValue) { if (IsDeserializing) { return; } if (previousValue != null && ReferenceEquals(previousValue.aspnet_Membership, this)) { previousValue.aspnet_Membership = null; } if (aspnet_Users != null) { aspnet_Users.aspnet_Membership = this; UserId = aspnet_Users.UserId; } if (ChangeTracker.ChangeTrackingEnabled) { if (ChangeTracker.OriginalValues.ContainsKey("aspnet_Users") && (ChangeTracker.OriginalValues["aspnet_Users"] == aspnet_Users)) { ChangeTracker.OriginalValues.Remove("aspnet_Users"); } else { ChangeTracker.RecordOriginalValue("aspnet_Users", previousValue); } if (aspnet_Users != null && !aspnet_Users.ChangeTracker.ChangeTrackingEnabled) { aspnet_Users.StartTracking(); } } }