internal void CheckCanRemoveParentRow(DataRow row)
{
Debug.Assert(Table.DataSet != null, "Relation " + ConstraintName + " isn't part of a DataSet, so this check shouldn't be happening.");
if (!Table.DataSet.EnforceConstraints)
{
return;
}
if (DataRelation.GetChildRows(ParentKey, ChildKey, row, DataRowVersion.Default).Length > 0)
{
throw ExceptionBuilder.RemoveParentRow(this);
}
}