Castle.ActiveRecord.AR.GenerateDropScripts C# (CSharp) Метод

GenerateDropScripts() публичный статический Метод

Generates the drop scripts for the database saving them to the supplied file name.
If ActiveRecord was configured to access more than one database, a file is going to be generate for each, based on the path and the fileName specified.
public static GenerateDropScripts ( String fileName ) : void
fileName String
Результат void
        public static void GenerateDropScripts(String fileName)
        {
            CheckInitialized();

            var isFirstExport = true;
            var fileCount = 1;

            foreach(var config in Holder.GetAllConfigurations())
            {
                var export = CreateSchemaExport(config);

                try
                {
                    export.SetOutputFile(isFirstExport ? fileName : CreateAnotherFile(fileName, fileCount++));
                    export.Drop(false, false);
                }
                catch(Exception ex)
                {
                    throw new ActiveRecordException("Could not drop the schema", ex);
                }

                isFirstExport = false;
            }
        }

Same methods

AR::GenerateDropScripts ( Type baseType, String fileName ) : void