TableDifference and additions/deletions

micmtmicmt Posts: 2
Effectively after comparison we should have left rows,right rows and different rows (i.e. deletions , additions, updates )
In your code samples ( TableMappingExample.cs) you seem to show only different rows
session.CompareDatabases(db1, db2, mappings);
               
TableDifference difference=session.TableDifferences["[dbo].WidgetPrices]"];
foreach(Row row in difference.ResultsStore)
...

How we can see additions and deletions ?

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hello,
    There are a few ways to do it... you can go through all of the rows using foreach and only print out rows that have a Type property of "In1" or "In2". You can also construct a ResultsReader that only shows "In1" or "In2" and iterate throug the results:
    Reader resultsReader = session.TableDifferences["[dbo].[Widgets]"].ResultsStore.GetReader(Row.RowType.In1);
    foreach (Row row in resultsReader)
    {
    ...
    
Sign In or Register to comment.