public void InitTableData() { using (SqlConnection connection = new SqlConnection(m_connectionString)) { // SET IDENTITY_INSERT acts only for current open connection, // so execute all inserts with one open connection connection.Open(); StoredProceduresTests.ExecuteSqlWithConnection("SET IDENTITY_INSERT Parts ON", connection); foreach (string sql in m_sqlInitTableData) { StoredProceduresTests.ExecuteSqlWithConnection(sql, connection); } connection.Close(); } }
private void CreateStoredProcedureInDatabaseFromPredefinedPlaceOnTheRepo() { string storedProcedureCreateSql = System.IO.File.ReadAllText(m_storedProcedurePath); StoredProceduresTests.ExecuteSql(storedProcedureCreateSql, m_connectionString); }