internal void SetupMapping(XmlDataDocument xd, DataSet ds)
{
// If are already mapped, forget about our current mapping and re-do it again.
if (IsMapped())
{
_tableSchemaMap = new Hashtable();
_columnSchemaMap = new Hashtable();
}
_doc = xd;
_dataSet = ds;
foreach (DataTable t in _dataSet.Tables)
{
AddTableSchema(t);
foreach (DataColumn c in t.Columns)
{
// don't include auto-generated PK & FK to be part of mapping
if (!IsNotMapped(c))
{
AddColumnSchema(c);
}
}
}
}