Beispiel #1
0
 public static IDataTableAccess GetDataTableAccess(string connectionString)
 {
     if (OracleAccess.IsOracleConnectionString(connectionString))
     {
         return(new OracleAccess());
     }
     else if (PostgreAccess.IsPostgreConnectionString(connectionString))
     {
         return(new PostgreAccess());
     }
     else if (MySqlAccess.IsMySqlConnectionString(connectionString))
     {
         return(new MySqlAccess());
     }
     else
     {
         return(new SqlAccess());
     }
 }
Beispiel #2
0
 public static IDataTableAccess GetDataTableAccess(Durados.View view)
 {
     if (view is Durados.Config.IConfigView)
     {
         return(new ConfigAccess());
     }
     else
     if (OracleAccess.IsOracleConnectionString(view.ConnectionString))
     {
         return(new OracleAccess());
     }
     if (PostgreAccess.IsPostgreConnectionString(view.ConnectionString))
     {
         return(new PostgreAccess());
     }
     else if (MySqlAccess.IsMySqlConnectionString(view.ConnectionString))
     {
         return(new MySqlAccess());
     }
     else
     {
         return(new SqlAccess());
     }
 }