protected UserGroupEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     if (SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _group = (GroupEntity)info.GetValue("_group", typeof(GroupEntity));
         if (_group != null)
         {
             _group.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         _user = (UserEntity)info.GetValue("_user", typeof(UserEntity));
         if (_user != null)
         {
             _user.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
 /// <summary> Removes the sync logic for member _group</summary>
 /// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
 /// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
 private void DesetupSyncGroup(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_group, new PropertyChangedEventHandler(OnGroupPropertyChanged), "Group", Northwind.DAL.RelationClasses.StaticUserGroupRelations.GroupEntityUsingGroupIdStatic, true, signalRelatedEntity, "UserGroups", resetFKFields, new int[] { (int)UserGroupFieldIndex.GroupId });
     _group = null;
 }