protected bool Equals(SqlReplicationConfigModel other) { var baseEquals = string.Equals(Name, other.Name) && string.Equals(Script, other.Script) && string.Equals(FactoryName, other.FactoryName) && string.Equals(ConnectionString, other.ConnectionString) && string.Equals(ConnectionStringName, other.ConnectionStringName) && string.Equals(ConnectionStringSettingName, other.ConnectionStringSettingName) && string.Equals(Id, other.Id) && string.Equals(RavenEntityName, other.RavenEntityName) && Disabled.Equals(other.Disabled) && Equals(SqlReplicationTables.Count, other.SqlReplicationTables.Count); if (baseEquals == false) return false; for (int i = 0; i < SqlReplicationTables.Count; i++) { if (SqlReplicationTables[i].Equals(other.SqlReplicationTables[i]) == false) return false; } return true; }
protected bool Equals(SqlReplicationConfigModel other) { var baseEquals = string.Equals(Name, other.Name) && string.Equals(Script, other.Script) && string.Equals(FactoryName, other.FactoryName) && string.Equals(ConnectionString, other.ConnectionString) && string.Equals(ConnectionStringName, other.ConnectionStringName) && string.Equals(ConnectionStringSettingName, other.ConnectionStringSettingName) && string.Equals(Id, other.Id) && string.Equals(RavenEntityName, other.RavenEntityName) && Disabled.Equals(other.Disabled) && Equals(SqlReplicationTables.Count, other.SqlReplicationTables.Count); if (baseEquals == false) { return(false); } for (int i = 0; i < SqlReplicationTables.Count; i++) { if (SqlReplicationTables[i].Equals(other.SqlReplicationTables[i]) == false) { return(false); } } return(true); }
private bool HasChanges(SqlReplicationConfigModel local, SqlReplicationConfig remote) { if (remote == null) return false; if (local.RavenEntityName != remote.RavenEntityName) return true; if (local.Script != remote.Script) return true; if (local.Disabled != remote.Disabled) return true; if (local.ConnectionString != remote.ConnectionString) return true; if (local.ConnectionStringName != remote.ConnectionStringName) return true; if (local.ConnectionStringSettingName != remote.ConnectionStringSettingName) return true; if (local.FactoryName != remote.FactoryName) return true; return false; }
private SqlReplicationConfig UpdateConfig(SqlReplicationConfig config, SqlReplicationConfigModel sqlReplicationConfig) { if (config == null) { return sqlReplicationConfig.ToSqlReplicationConfig(); } config.ConnectionString = sqlReplicationConfig.ConnectionString; config.ConnectionStringName = sqlReplicationConfig.ConnectionStringName; config.ConnectionStringSettingName = sqlReplicationConfig.ConnectionStringSettingName; config.Disabled = sqlReplicationConfig.Disabled; config.FactoryName = sqlReplicationConfig.FactoryName; config.Id = sqlReplicationConfig.Id; config.Name = sqlReplicationConfig.Name; config.RavenEntityName = sqlReplicationConfig.RavenEntityName; config.Script = sqlReplicationConfig.Script; config.SqlReplicationTables = new List<SqlReplicationTable>(sqlReplicationConfig.SqlReplicationTables); return config; }