There is an example of this in the Toolkit Example files (tablemappingexample.cs)
// Create the mappings between a certain table
TableMapping tableMapping = (TableMapping)mappings.Join(db1.Tables["[dbo].[WidgetPrices]"], db2.Tables["[dbo].[WidgetPrices]"]);
// Set the custom comparison key for the table
tableMapping.MatchingMappings.Clear();
tableMapping.MatchingMappings.Add(tableMapping.FieldMappings["WidgetID"]);
tableMapping.RefreshMappingStatus();
Ok, thats fine how do I then just select one other column to do the comparison on. So I only want Updates to be scripted out if only one columns has different values?
Then you'll want to set the 'include' property to true on the FieldMapping objects for the Fields that you want to compare and false for the ones you don't want to compare. Each TableMapping object in tableMappings should have a FieldMappings collection.
Comments
There is an example of this in the Toolkit Example files (tablemappingexample.cs)
Then you'll want to set the 'include' property to true on the FieldMapping objects for the Fields that you want to compare and false for the ones you don't want to compare. Each TableMapping object in tableMappings should have a FieldMappings collection.