title: How to use whereif in LINQ
body: <p>Hi can someone help me how best we can use whereif in LINQ</p>
  
  <pre><code>IQueryable&lt;Employee&gt; empQuery;
       if (empId  == "")
       {
           empQuery = dbContext.Emps
             .Include(x =&gt; x.Name)
             .Include(x =&gt; x.Code)
             .Where(x =&gt; x.Id == empId);
       }
       else
       {
          empQuery = dbContext.Emps
             .Include(x =&gt; x.Name)
             .Include(x =&gt; x.Code);
       }
  </code></pre>
  
  <p>I think we can make this query very simple by using whereif right? Can someone help me how to make this query simple by using whereif? Instead of check if (empid == "") ?</p>
  
  <p>Is it possible?</p>