//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); }
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); }