I'm trying to exclude a list of tables from the compare but it doesn't seem to work. Below is my code that loops through the mappings and the datatable that contains the tablenames to exclude.
RedGate rg = new RedGate();
DataTable dtTableToExclude = rg.GetTablesToExclude();
for (int i = 0; i < dtTableToExclude.Rows.Count; i++)
{
tableToExclude = "[dbo].[" + dtTableToExclude.Rows[i]["TableName"].ToString() + "]";
foreach (TableMapping m in mappings)
{
try
{
if (m.Obj1.FullyQualifiedName != null)
{
if (m.Obj1.FullyQualifiedName == tableToExclude)
{
m.Include = false;
break;
}
}
m.RefreshMappingStatus();
}
Thanks in advance ...
Thanks in advance ...