Пример #1
0
        public static DataFactory GetDataFactory(ConnectionSetting setting)
        {
            DataFactory factory = null;

            switch (setting.Provider)
            {
            case DatabaseType.Oracle:
                factory = new OracleProvider.OracleDataFactory(setting.ConnectionString);
                break;

            case DatabaseType.Mssql:
                factory = new MssqlProvider.SqlServerDataFactory(setting.ConnectionString);
                break;

            case DatabaseType.MySQL:
                factory = new MySQLProvider.MySQLDataFactory(setting.ConnectionString);
                break;

            default:
                break;
            }
            return(factory);
        }