/// <summary> setups the sync logic for member _employees</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncEmployees(IEntityCore relatedEntity) { if (_employees != relatedEntity) { DesetupSyncEmployees(true, true); _employees = (EmployeesEntity)relatedEntity; this.PerformSetupSyncRelatedEntity(_employees, new PropertyChangedEventHandler(OnEmployeesPropertyChanged), "Employees", SD.LLBLGen.Pro.Examples.WCF.RelationClasses.StaticOrdersRelations.EmployeesEntityUsingEmployeeIdStatic, true, new string[] { }); } }
protected EmployeesEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if (SerializationHelper.Optimization != SerializationOptimization.Fast) { _employees_ = (EntityCollection <EmployeesEntity>)info.GetValue("_employees_", typeof(EntityCollection <EmployeesEntity>)); _orders = (EntityCollection <OrdersEntity>)info.GetValue("_orders", typeof(EntityCollection <OrdersEntity>)); _customersCollectionViaOrders = (EntityCollection <CustomersEntity>)info.GetValue("_customersCollectionViaOrders", typeof(EntityCollection <CustomersEntity>)); _employees = (EmployeesEntity)info.GetValue("_employees", typeof(EmployeesEntity)); if (_employees != null) { _employees.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 _employees</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 DesetupSyncEmployees(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity(_employees, new PropertyChangedEventHandler(OnEmployeesPropertyChanged), "Employees", SD.LLBLGen.Pro.Examples.WCF.RelationClasses.StaticOrdersRelations.EmployeesEntityUsingEmployeeIdStatic, true, signalRelatedEntity, "Orders", resetFKFields, new int[] { (int)OrdersFieldIndex.EmployeeId }); _employees = null; }