public static string TableDifference(CompareSideType sideType, ITableSchema schema1, ITableSchema schema2, string[] primaryKeys, string[] exceptColumns) { //don't compare identity column or computed column exceptColumns = schema1.Columns .Where(column => column.IsComputed || (column.IsIdentity && !column.IsPrimary)) .Select(column => column.ColumnName) .Union(exceptColumns) .Distinct() .ToArray(); TableCompare compare = new TableCompare(schema1, schema2) { SideType = sideType, ExceptColumns = exceptColumns }; IPrimaryKeys keys = new PrimaryKeys(primaryKeys); return(compare.Compare(keys)); }
public RowCompare(TableCompare table, DataRow row1, DataRow row2) { this.table = table; Difference(row1, row2); }
public static string TableDifference(CompareSideType sideType, TableSchema schema1, TableSchema schema2, string[] primaryKeys, string[] exceptColumns) { TableCompare compare = new TableCompare(schema1, schema2) { SideType = sideType, ExceptColumns = exceptColumns }; IPrimaryKeys keys = new PrimaryKeys(primaryKeys); return compare.Compare(keys); }
public RowCompare(TableCompare table, DataRow row1, DataRow row2) { this.table = table; Difference(row1, row2); }