title: multiple condition in entity framework
body: <p>I need to write a linq query to check an ID is exist in sql table and If the ID is exist need to check one field is null or not in the same table.</p>
  
  <p>I am new in entity framework ,please help.</p>
  
  <p>Currently doing by like this:-</p>
  
  <p>Here i am selecting by two methods,if the first method returns true i am checking the second method. Based on this value i need to enable/disable a tab.</p>
  
  <pre><code>public bool GetCompanyInfoById(int customerId)
          {
              using (var context = new eSmoEntities())
              {
                  bool companyExist = context.tm_cmd_company_details.Any(x=&gt;x.com_id.Equals(customerId));
                  return companyExist;
              }
          }
  
          public bool GetGroupForCompany(int customerId)
          {
          using (var context = new eSmoEntities())
              {
                  var customer = context.tm_cmd_company_details.Where(x =&gt; x.com_id == customerId).Select(x=&gt;x.cmd_group_id).FirstOrDefault();
                  return customer != null ? true : false;
              }
          }
  </code></pre>