public static BaseDbType CreateInstance(DbTypeSupported type)
        {
            switch (type)
            {
            case DbTypeSupported.SqlServer:
                return(new SqlServerDbType());

            case DbTypeSupported.Access:
                return(new AccessDbType());

            case DbTypeSupported.Firebird:
                return(new FirebirdDbType());

            case DbTypeSupported.Postgres:
                return(new PostgresDbType());

            case DbTypeSupported.MySql:
                return(new MysqlDbType());

            case DbTypeSupported.SqlLite:
                return(new SqLiteDbType());

            case DbTypeSupported.Oracle:
                return(new OracleDbType());

            default:
                throw new Exception(Resources.DbNotSup);
            }
        }
Example #2
0
 public DbConnectionInfo(string connStr, DbTypeSupported type)
 {
     this.ConnectionString = connStr;
     this.DbType           = BaseDbType.CreateInstance(type);
 }