コード例 #1
0
 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();
     }
 }
コード例 #2
0
 private void CreateStoredProcedureInDatabaseFromPredefinedPlaceOnTheRepo()
 {
     string storedProcedureCreateSql = System.IO.File.ReadAllText(m_storedProcedurePath);
     StoredProceduresTests.ExecuteSql(storedProcedureCreateSql, m_connectionString);
 }