title: Batch Update/insert in using SQLCommand in C#
body: <p>How I could achieve batch <code>update/insert</code> using <code>SQLCommand</code>. I wanted to create <code>SQLCommand</code> text dynamically in <code>for</code> loop of <code>MyObject[]</code> in C# with 10 <code>SQLParameter</code></p>
  
  <p>in case of bulk <code>insert</code>, i need to check for every record that it already exist or not. i.e.</p>
  
  <p><code>if not Exists(select pkid from table1 where fkid1=@fkid1 and fkid2=@fkid1)</code></p>
  
  <p><code>begin</code></p>
  
  <pre><code>insert....
  </code></pre>
  
  <p><code>end</code></p>
  
  <p>This is to be done from C#.No stored procedure in db</p>