public bool HasSameProperties(Constraint other, CompareConfig compareConfig) { return IsSimilar(other) && (Name == other.Name || compareConfig.IgnoreConstraintsNameMismatch) && Clustered == other.Clustered && Unique == other.Unique; }
public bool IsSimilar(Constraint other) { return HasSameColumns(other) && HasSameIncludedColumns(other) && Table.Name == other.Table.Name && Table.Owner == other.Table.Owner && Type == other.Type; }
private bool HasSameIncludedColumns(Constraint other) { return this.IncludedColumns.Join(other.IncludedColumns, x => x, y => y, (x, y) => x == y).All(equal => equal); }