title: c# LINQ find value in datareader
body: <p>This is my table on MySQL database :</p>
  
  <pre><code>+----------+--------+---------+
  | UserName | Region | UsercIX |
  +----------+--------+---------+
  | a123456  | X410   | NULL    |
  | a123456  | X420   |       1 |
  | a123456  | X430   | NULL    |
  | a123456  | X440   |       1 |
  +----------+--------+---------+
  </code></pre>
  
  <p>The user <strong>a123456</strong> is write enabled for <strong>X420</strong> and <strong>X440</strong> Region <em>(UsercIX=1)</em> and reading for <strong>X410</strong> and <strong>X430</strong> Region (<em>UsercIX=NULL</em>).</p>
  
  <p>I need to find in this table -via <strong>LINQ</strong> or your suggestion- only values equals to 1 in the column <strong>UsercIX</strong>, because with <strong>DataReader</strong> extracting the first value of the column which is null.</p>
  
  <p>Please an you help me ?</p>
  
  <p>My code below</p>
  
  <pre><code>using (OdbcDataReader reader = command.ExecuteReader())
  {
      if (reader.HasRows)
      {
          while (reader.Read())
          {
             int UsercIX = Convert.ToInt32(reader["UsercIX"]);  //IS NULL
          }
      }
  }
  </code></pre>
  
  <p><strong>Edit #01</strong></p>
  
  <pre><code>using (OdbcDataReader reader = command.ExecuteReader())
  {
      if (reader.HasRows)
      {
          while (reader.Read())
          {
              int UsercIX = reader.GetInt32(6);
          }
      }                            
  }
  </code></pre>