System.Data.ForeignKeyConstraint.CheckCanRemoveParentRow C# (CSharp) Method

CheckCanRemoveParentRow() private method

private CheckCanRemoveParentRow ( DataRow row ) : void
row DataRow
return void
        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);
            }
        }