Пример #1
0
        public void SaveDatabaseTriggersToFile()
        {
            Controller.DatabaseManager    databaseManager = new Controller.DatabaseManager(_generalInfo);
            List <DTO.DbObjectDefinition> items           = databaseManager.GetObjects(DTO.Enum.ObjectType.Triggers).Take(_limitList).ToList();

            Assert.Null(Record.Exception(() => databaseManager.SaveObjects(items)));
        }
Пример #2
0
        private static void ExecuteTaskOne(GeneralInfo generalInfo, string[] args)
        {
            Controller.DatabaseManager databaseManager = new Controller.DatabaseManager(generalInfo);
            DTO.Enum.ObjectType        objectType      = DTO.Enum.ObjectType.All;
            string objectName = string.Empty;
            string schemaName = string.Empty;

            if (args.Length > 3)
            {
                objectName = args[3];
            }

            if (args.Length > 4)
            {
                schemaName = args[4];
            }

            if (args.Length > 5)
            {
                objectType = (DTO.Enum.ObjectType)Enum.Parse(typeof(DTO.Enum.ObjectType), args[5]);
            }

            List <DbObjectDefinition> result = databaseManager.SaveObjects(databaseManager.GetObjects(objectType, objectName, schemaName));

            if (generalInfo.GenerateReport)
            {
                databaseManager.SaveReport(result);
            }
        }
Пример #3
0
 public void ExtractViewsFromDatabase()
 {
     Controller.DatabaseManager databaseManager = new Controller.DatabaseManager(_generalInfo);
     Assert.True(databaseManager.GetObjects(DTO.Enum.ObjectType.Views).Count > 0);
 }