title: What is the best way to check IQueryable result set is null
body: <p>I just want to know what is the best way to check if an <code>IQueryable</code> result has no values.</p>
  
  <p>eg. if we have a method like</p>
  
  <pre><code>public static IQueryable&lt;Table&gt; DisplayAll()
  {
      var db = new DataContext();
      var list= from data in db.Table select data;
      return list;
  }
  </code></pre>
  
  <p>and then we do something like this</p>
  
  <pre><code>var list = DisplayAll();
  if(list != null)
  {
       //do something --- in here even if the result set has no values it will
       // go to this line. It just say `enumeration yielded no results`
  }
  </code></pre>
  
  <p>Any possible way to check the result set has content or not??</p>
  
  <p>Thanks</p>