public Objects.Database CompareToSchema(ComparerParameters parameters)
        {
            try
            {
                _parameters = parameters;

                if (parameters.SchemaDatabase == null)
                {
                    _schemaDatabase = SerializeFileToDatabase(parameters.SchemaPath);
                }

                if (parameters.TargetDatabase == null)
                {
                    _targetDatabase = GenerateDatabase(parameters.TargetParameters);
                }


                _differents = CompareDatabase();

                if (parameters.AutoSaveDifference)
                {
                    SaveScript(parameters.ScriptSavePath);
                }
                return(_differents);
            }
            catch (Exception ex)
            {
                LogManager.LogWriter.Error("Database Compare failed." + ex.Message);
                return(null);
            }
        }
 public bool IsDifferent(ComparerParameters parameters)
 {
     CompareToSchema(parameters);
     if (_differents != null)
     {
         if (_differents.Tables.Count > 0 || _differents.Sequences.Count > 0 || _differents.Trigers.Count > 0 ||
             _differents.Views.Count > 0 || _differents.Functions.Count > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     else
     {
         return(false);
     }
 }