You can't assign DBNull to a field in the DataTable. When you allow DBNull in a DataTable, an extra method is generated. In this case: SetParentApplicationRoleIdNull()
for example:
var newRow = DataSet.ChildApplications.NewChildApplicationRow();
newRow.AField = "Some text";
newRow.SetParentApplicationRoleIdNull();
DataSet.ChildApplications.AddChildApplicationRow(newRow);
This is also while checking the value. You can't directly use the 'property' ParentApplicationRoleId, If you want to read it, you'll have the check it first with another generated method: IsParentApplicationRoleIdNull()
for example:
foreach(var row in DataSet.ChildApplications.Rows)
{
if(!row.IsParentApplicationRoleIdNull())
{
Trace.WriteLine($"ParentApplicationRoleId: {row.ParentApplicationRoleId}");
}
else
{
Trace.WriteLine("ParentApplicationRoleId: is DBNull, and can't be shown");
}
}