title: specified cast is not valid in linq to sql
body: <p>I used this code:</p>
  
  <pre><code>int i = Int32.Parse(dataGridView2.Rows[rowID].Cells["ProfID"].Value.ToString());
  var db = new bouDataDataContext();
  var sel = db.Payments.Where(c =&gt; c.WTID == wtID &amp;&amp; c.ProfID == i).Single();
  </code></pre>
  
  <p>and  <code>c.WTID</code>  is defined as integer in the database but I receive this error:</p>
  
  <blockquote>
    <p>specified Cast is not a valid</p>
  </blockquote>