public virtual IDbmsSyntax CreateDbmsSyntax()
 {
     IDbmsSyntax dmDbmsSyntax;
     
     switch (dbms)
     {
         case SupportedDbms.ORACLE:
             dmDbmsSyntax = new OracleDbmsSyntax();
             break;
         case SupportedDbms.MSSQL:
             dmDbmsSyntax = new MsSqlDbmsSyntax();
             break;
         case SupportedDbms.MYSQL:
             dmDbmsSyntax = new MySqlDbmsSyntax();
             break;
         case SupportedDbms.FIREBIRD:
             dmDbmsSyntax = new FirebirdDbmsSyntax();
             break;
         case SupportedDbms.POSTGRE:
             dmDbmsSyntax = new PostgreDbmsSyntax();
             break;
         case SupportedDbms.SYBASE:
             dmDbmsSyntax = new SybaseDbmsSyntax();
             break;
         default:
             throw new DbmsNotSupportedException("Supported dbms: ora, mssql, mysql, firebird, postgre, sybase");
     }
     dmDbmsSyntax.SetDefaultDatabaseName(connectionString);
     return dmDbmsSyntax;
 }
Example #2
0
        public virtual IDbmsSyntax CreateDbmsSyntax()
        {
            IDbmsSyntax dmDbmsSyntax;

            switch (dbms)
            {
            case SupportedDbms.ORACLE:
                dmDbmsSyntax = new OracleDbmsSyntax();
                break;

            case SupportedDbms.MSSQL:
                dmDbmsSyntax = new MsSqlDbmsSyntax();
                break;

            case SupportedDbms.MYSQL:
                dmDbmsSyntax = new MySqlDbmsSyntax();
                break;

            case SupportedDbms.FIREBIRD:
                dmDbmsSyntax = new FirebirdDbmsSyntax();
                break;

            case SupportedDbms.POSTGRE:
                dmDbmsSyntax = new PostgreDbmsSyntax();
                break;

            case SupportedDbms.SYBASE:
                dmDbmsSyntax = new SybaseDbmsSyntax();
                break;

            default:
                throw new DbmsNotSupportedException("Supported dbms: ora, mssql, mysql, firebird, postgre, sybase");
            }
            dmDbmsSyntax.SetDefaultDatabaseName(connectionString);
            return(dmDbmsSyntax);
        }