title: ASP.NET and Entity Framework Check The Result is Empty Or Not
body: <p>Using code like this:</p>
  
  <pre><code>AppEntities data = new AppEntities();
  var result = data.GIS_CONTRACTOR_TEST.Where(x =&gt; x.CONTRACTORNAME == txtSearch.Text);
  GridView1.DataSource = result.ToList();
  GridView1.DataBind();
  </code></pre>
  
  <p>I am able to filter data based on the text box. now my question is How I can check if the <code>result</code> <strong>is empty or not</strong>? I mean if I want to send a message to user that there is not such a value in the database? how can I do that?</p>
  
  <p>Thanks</p>