protected DbManager(string databaseName) : this() { DatabaseName = databaseName; DbConfigSection config = (DbConfigSection)ConfigurationManager.GetSection("TestDatabases/" + databaseName); ConnectionString = config.DatabaseConfig.ConnectionString; SqlConnectionStringBuilder connectionStringBuilder = new SqlConnectionStringBuilder(ConnectionString); DataSource = connectionStringBuilder.DataSource; ServerConnection serverConnection = new ServerConnection(DataSource); serverConnection.DatabaseName = DatabaseName; Server server = new Server(serverConnection); _database = server.Databases[DatabaseName]; UpdateProcedures(); CsvFilePaths = new Dictionary <string, string>(); foreach (TableElement t in config.Tables) { if (t.Name.Length > 1) { CsvFilePaths.Add(t.Name, t.CsvFile); } } }
public SqliteAdapter(DbConfigSection config) { _connectionString = config.ConnectionString; }