Exemplo n.º 1
0
        //public bool ShouldWriteUpdateQuery { get; set; }

        //public void OnUpdated()
        //{
        //    if (Updated != null)
        //        Updated(this, null);
        //}

        public ChildRelationshipInfo AddChildRelationshipInfo(RelationshipDTO relationship)
        {
            var childRelationshipInfo = new ChildRelationshipInfo()
            {
                Relationship = relationship, SourceData = this
            };

            ChildRelationshipInfos.Add(childRelationshipInfo);
            CheckChildRelationshipInfoChangeMonitor();
            return(childRelationshipInfo);
        }
Exemplo n.º 2
0
 private bool DataItemIsTargetOrIsInParents(DP_DataRepository targetDataItem, ChildRelationshipInfo parentChildRelationshipInfo)
 {
     if (parentChildRelationshipInfo != null)
     {
         if (parentChildRelationshipInfo.SourceData == targetDataItem)
         {
             return(true);
         }
         else
         {
             return(DataItemIsTargetOrIsInParents(targetDataItem, parentChildRelationshipInfo.SourceData.ParantChildRelationshipInfo));
         }
     }
     return(false);
 }