static EntityProvider CreateNewProvider(DBConnection dbconfig)
 {
     if (dbconfig.DbType.Equals("sqlserver", StringComparison.OrdinalIgnoreCase))
     {
         return new SqlEntityProvider(dbconfig.Key, dbconfig.GetConnectionString());
     }
     else if (dbconfig.DbType.Equals("oracle", StringComparison.OrdinalIgnoreCase))
     {
         return new OracleEntityProvider(dbconfig.Key, dbconfig.GetConnectionString());
     }
     else
     {
         throw new Exception("error config section:the section dbConnectionGroup in dbtype property!");
     }
 }
 public void Add(DBConnection element)
 {
     BaseAdd(element);
 }
 public void Remove(DBConnection element)
 {
     if (BaseIndexOf(element) >= 0)
         BaseRemove(element.Key);
 }
 public int IndexOf(DBConnection element)
 {
     return BaseIndexOf(element);
 }