This is a DataSet structure; if you do not follow the hierarchy and provide identifiers accordingly, you will not get the desired result. There is also a reason why you do not see the Extension object if you thought about it.

Since you only insert 100 , where the table structure is two columns, you get NULL for child_Id. The column is nullable, so insertion passes because a null value satisfies the foreign key constraint.
To check, follow these steps:
a.Tables[3].Columns[1].AllowDBNull = false;
before your addition you will see this error:
Error line 11: a.Tables[3].Rows.Add(100); Column 'child_Id' does not allow nulls.
If you then do:
a.Tables[3].Rows.Add(100, 0);
You are getting:
Error line 11: a.Tables[3].Rows.Add(100, 0); ForeignKeyConstraint child_childItem requires the child key values (0) to exist in the parent table.
Then the problem is that the referential integrity columns added by the tool are null - there is no way to overcome this behavior.
source share