Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libraries/System.Data.Common/src/System/Data/xmlsaver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,7 @@ private string FindTargetNamespace(DataTable table)
}
}
}
else
else if(_ds != null)
{ // if it does not have any parent table , then it should inherit NS from DataSet
tgNamespace = _ds!.Namespace;
}
Expand Down Expand Up @@ -1507,7 +1507,7 @@ internal XmlElement HandleColumn(DataColumn col, XmlDocument dc, XmlElement sche
schNode.AppendChild(root);
root = _dc.CreateElement(Keywords.XSD_PREFIX, refString, Keywords.XSDNS);
root.SetAttribute(Keywords.REF, _prefixes[col.Namespace] + ":" + col.EncodedColumnName);
if (col.Table.Namespace != _ds!.Namespace)
if (col.Table.Namespace != _ds?.Namespace)
{
_ = GetSchema(col.Table.Namespace);
}
Expand Down