title: SqlConnection with Parallel programming
body: <p>This is my existing code which save some data to several tables</p>
  
  <pre><code>using (SqlConnection conn = new SqlConnection("myConnString"))
  {
     DoWork1(conn);
     DoWork2(conc);
     DoWork3(conn);
  }
  </code></pre>
  
  <p>In order to speed my code up so i try to get .net TPL support and i rehanged my code as below</p>
  
  <pre><code>using (SqlConnection conn = new SqlConnection("myConnString"))
  {
     ParallelOptions pw = new ParallelOptions();
     pw.MaxDegreeOfParallelism = Environment.ProcessorCount;
  
     Parallel.Invoke(pw,()=&gt; DoWork1(conn),()=&gt; DoWork2(conc),()=&gt; DoWork3(conn));
  } 
  </code></pre>
  
  <p>But this throws me an Internal connection fatal error exception from the ExecuteNonQuery() method in my data access layer.Is my parallel approach is wrong?</p>