示例#1
0
 public Database()
 {
     if(Server.ProviderType == DataProviderType.MSSQL)
     {
         _strategy = new TableStrategySQLServer();
     }
     else if(Server.ProviderType == DataProviderType.MySql)
     {
         _strategy = new TableStrategyMySQL();
     }
     else if(Server.ProviderType == DataProviderType.PostgresSql)
     {
         _strategy = new TableStrategyPostgres();
     }
     else if (Server.ProviderType == DataProviderType.Oracle)
     {
         _strategy = new TableStrategyOracle();
     }
 }
示例#2
0
 public Database()
 {
     if (Server.ProviderType == DataProviderType.SqlClient)
     {
         _strategy = new TableStrategySQLServer();
     }
     else if (Server.ProviderType == DataProviderType.MySql)
     {
         _strategy = new TableStrategyMySQL();
     }
     else if (Server.ProviderType == DataProviderType.PostgresSql)
     {
         _strategy = new TableStrategyPostgres();
     }
     else if (Server.ProviderType == DataProviderType.Oracle)
     {
         _strategy = new TableStrategyOracle();
     }
 }