Пример #1
0
        public ApplicationController(NMG.Core.ApplicationPreferences applicationPreferences, ColumnDetails columnDetails)
        {
            applicationPreferences.FolderPath = AddSlashToFolderPath(applicationPreferences.FolderPath);
            codeGenerator = new CodeGenerator(applicationPreferences, columnDetails);

            if (applicationPreferences.ServerType == ServerType.Oracle)
            {
                mappingGenerator = new OracleMappingGenerator(applicationPreferences, columnDetails);
            }
            else
            {
                mappingGenerator = new SqlMappingGenerator(applicationPreferences, columnDetails);
            }
        }
Пример #2
0
 public ApplicationController(ApplicationPreferences applicationPreferences, Table table)
 {
     this.applicationPreferences = applicationPreferences;
     codeGenerator = new CodeGenerator(applicationPreferences, table);
     fluentGenerator = new FluentGenerator(applicationPreferences, table);
     castleGenerator = new CastleGenerator(applicationPreferences, table);
     contractGenerator = new ContractGenerator(applicationPreferences, table);
     byCodeGenerator = new ByCodeGenerator(applicationPreferences, table);
     if (applicationPreferences.ServerType == ServerType.Oracle)
     {
         mappingGenerator = new OracleMappingGenerator(applicationPreferences, table);
     }
     else
     {
         mappingGenerator = new SqlMappingGenerator(applicationPreferences, table);
     }
 }