public void DropDatabase() { IDbQueryBase dbQueryBase = this.BuildDbQueryBase(); dbQueryBase.ExecuteNonQuery("USE [master]"); dbQueryBase.ExecuteNonQuery($"DROP DATABASE {this.dbName}"); }
public void CreateDatabase() { IDbQueryBase dbQueryBase = this.BuildDbQueryBase(); string fullSql = File.ReadAllText(scriptFilePath).Replace("@DBNAME", this.dbName); foreach (string sql in fullSql.Split(";")) { dbQueryBase.ExecuteNonQuery(sql); } }
public BootstrapFixture() { IDbQueryBase dbQueryBase = this.BuildDbQueyBase(); this.container = new DbAbstractionTestContainer(dbQueryBase); string fullSql = File.ReadAllText(scriptFilePaht).Replace("@DBNAME", dbName); foreach (string sql in fullSql.Split(";")) { dbQueryBase.ExecuteNonQuery(sql); } }