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

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

Generates the creation scripts for the database
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 GenerateCreationScripts ( String fileName ) : void
fileName String
Результат void
        public static void GenerateCreationScripts(String fileName)
        {
            CheckInitialized();

            var isFirstExport = true;
            var fileCount = 1;

            foreach(var export in Holder.GetAllConfigurations().Select(c => CreateSchemaExport(c)))
            {
                try
                {
                    export.SetOutputFile(isFirstExport ? fileName : CreateAnotherFile(fileName, fileCount++));
                    export.Create(false, false);
                }
                catch(Exception ex)
                {
                    throw new ActiveRecordException("Could not create the schema", ex);
                }

                isFirstExport = false;
            }
        }

Same methods

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