예제 #1
0
            protected override void RemoveCore(DataRelation relation)
            {
                if (_fParentCollection)
                {
                    if (relation.ChildTable != _table)
                    {
                        throw ExceptionBuilder.ChildTableMismatch();
                    }
                }
                else
                {
                    if (relation.ParentTable != _table)
                    {
                        throw ExceptionBuilder.ParentTableMismatch();
                    }
                }

                GetDataSet().Relations.Remove(relation);
                RemoveCache(relation);
            }
예제 #2
0
            protected override void RemoveCore(DataRelation relation)
            {
                if (fParentCollection)
                {
                    if (relation.ChildTable != table)
                    {
                        throw ExceptionBuilder.ChildTableMismatch();
                    }
                }
                else
                {
                    if (relation.ParentTable != table)
                    {
                        throw ExceptionBuilder.ParentTableMismatch();
                    }
                }

//                base.RemoveCore(relation); // Will be called from DataSet.Relations.RemoveCore
                GetDataSet().Relations.Remove(relation);
                RemoveCache(relation);
            }