title: LINQ and column with Null
body: <p>I have a <code>DataSet</code>, with a column, lets call it <strong>A</strong>, of type <code>Int</code>. I want to run a quiote simple <code>LINQ</code> query, using <code>where</code> on column <strong>A</strong>. The problem is, that column <strong>A</strong> can contain null values (at least in the <code>T-SQL</code> table from where i get it, I am not sure how these null values are translated in the <code>TableAdapter</code>). This results in an error when I try to run the following query:</p>
  
  <pre><code>MyTableDataTable dt =
      new MyTableDataTable();
  
  MyTableTableAdapter ta =
       new MyTableTableAdapter();
  
          ta.Fill(dt);
  
  // This is where the error occurs
  var query = from  tbl in dt.AsEnumerable()
              where tbl.A == parentId 
              &amp;&amp;    tbl.B == languageId
              select new
              {
                  tbl.A,
                  tbl.B,
                  tbl.C
              };
  </code></pre>
  
  <p>The error message it returns is this:</p>
  
  <blockquote>
    <p><strong>StrongTypingException was unhandled</strong> </p>
    
    <p>An unhandled exception of type
     'System.Data.StrongTypingException' occurred in
    MyProgram.exe</p>
    
    <p>Additional information: The value for column 'A' in
    table 'MyTable' is DBNull.</p>
  </blockquote>
  
  <p>How should <code>null</code>values be handed in a sceniario like this? I would like to do something like <code>where A is not null</code>, but I can't really find a way to do this...</p>