/// <summary> setups the sync logic for member _orders</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncOrders(IEntityCore relatedEntity)
 {
     if (_orders != relatedEntity)
     {
         DesetupSyncOrders(true, true);
         _orders = (OrdersEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity(_orders, new PropertyChangedEventHandler(OnOrdersPropertyChanged), "Orders", SD.LLBLGen.Pro.Examples.WCF.RelationClasses.StaticOrderDetailsRelations.OrdersEntityUsingOrderIdStatic, true, new string[] {  });
     }
 }
 protected OrderDetailsEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     if (SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _orders = (OrdersEntity)info.GetValue("_orders", typeof(OrdersEntity));
         if (_orders != null)
         {
             _orders.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         _products = (ProductsEntity)info.GetValue("_products", typeof(ProductsEntity));
         if (_products != null)
         {
             _products.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 _orders</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 DesetupSyncOrders(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_orders, new PropertyChangedEventHandler(OnOrdersPropertyChanged), "Orders", SD.LLBLGen.Pro.Examples.WCF.RelationClasses.StaticOrderDetailsRelations.OrdersEntityUsingOrderIdStatic, true, signalRelatedEntity, "OrderDetails", resetFKFields, new int[] { (int)OrderDetailsFieldIndex.OrderId });
     _orders = null;
 }