public ICompareColumnInfo Column(string columnName) { Guard.ArgumentIsNotNull(columnName, nameof(columnName)); if (!Table.Columns.Contains(columnName)) { throw new ArgumentException($"Column {columnName} is not found in Table."); } return(CompareColumns.Add(columnName, null)); }
public virtual IComparisionResult Execute() { if (Table == CompareTable) { return(null); } Validate(); if (CompareColumns.Count <= 0) { for (var i = 0; i < Table.Columns.Count && i < CompareTable.Columns.Count; i++) { CompareColumns.Add(Table.Columns[i].ColumnName, CompareTable.Columns[i].ColumnName); } } if (CompareKeys.Count > 0) { return(CompareWithPrimaryKeys()); } return(CompareWithColumns()); }