Пример #1
0
 static public IDataStoreSchemaExplorer GetDataStoreSchemaExplorer(IDataStoreSchemaExplorer dataStoreSchemaExplorer) {
     if (dataStoreSchemaExplorer is MSSqlConnectionProvider) {
         var msSqlConnectionProvider = ((MSSqlConnectionProvider)dataStoreSchemaExplorer);
         dataStoreSchemaExplorer = new Xpo.ConnectionProviders.MSSqlConnectionProvider(msSqlConnectionProvider.Connection, msSqlConnectionProvider.AutoCreateOption);
     } else if (dataStoreSchemaExplorer is OracleConnectionProvider) {
         var msSqlConnectionProvider = ((OracleConnectionProvider)dataStoreSchemaExplorer);
         dataStoreSchemaExplorer = new Xpo.ConnectionProviders.OracleConnectionProvider(msSqlConnectionProvider.Connection, msSqlConnectionProvider.AutoCreateOption);
     } else if (dataStoreSchemaExplorer is MySqlConnectionProvider) {
         var msSqlConnectionProvider = ((MySqlConnectionProvider)dataStoreSchemaExplorer);
         dataStoreSchemaExplorer = new Xpo.ConnectionProviders.MySqlConnectionProvider(msSqlConnectionProvider.Connection, msSqlConnectionProvider.AutoCreateOption);
     }
     return dataStoreSchemaExplorer;
 }
Пример #2
0
 static public IDataStoreSchemaExplorer GetDataStoreSchemaExplorer(IDataStoreSchemaExplorer dataStoreSchemaExplorer)
 {
     if (dataStoreSchemaExplorer is MSSqlConnectionProvider)
     {
         var msSqlConnectionProvider = ((MSSqlConnectionProvider)dataStoreSchemaExplorer);
         dataStoreSchemaExplorer = new Xpo.ConnectionProviders.MSSqlConnectionProvider(msSqlConnectionProvider.Connection, msSqlConnectionProvider.AutoCreateOption);
     }
     else if (dataStoreSchemaExplorer is OracleConnectionProvider)
     {
         var msSqlConnectionProvider = ((OracleConnectionProvider)dataStoreSchemaExplorer);
         dataStoreSchemaExplorer = new Xpo.ConnectionProviders.OracleConnectionProvider(msSqlConnectionProvider.Connection, msSqlConnectionProvider.AutoCreateOption);
     }
     else if (dataStoreSchemaExplorer is MySqlConnectionProvider)
     {
         var msSqlConnectionProvider = ((MySqlConnectionProvider)dataStoreSchemaExplorer);
         dataStoreSchemaExplorer = new Xpo.ConnectionProviders.MySqlConnectionProvider(msSqlConnectionProvider.Connection, msSqlConnectionProvider.AutoCreateOption);
     }
     return(dataStoreSchemaExplorer);
 }