コード例 #1
0
        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));
        }
コード例 #2
0
        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());
        }