title: EF Core 3.1 searching filter
body: <p>I am trying to create search filter with a lot of options (string input, select input ...). I need to filter tags by category if categoryId more than 0,  if categoryId equals 0 return all tags with all related categories (or don't apply category option for searching). But my code doesn't return any categories in both cases, and doesn't give me any mistakes. A lot of examples in the internet that I found shows how work just one string input. </p>
  
  <pre><code>        IQueryable&lt;Tag&gt; tags = _context.Tag
                                  .Where(s =&gt; EF.Functions.Like(s.Name, "%" + name + "%"))
                                  .Where(s =&gt; EF.Functions.Like(s.Description, "%" + description + "%"))
                                  .Include(s =&gt; s.Value)
                                  .Include(s =&gt; s.Period);     
          if (categoryId &gt; 0)
          {
              tags.Include(s =&gt; s.Category).Where(s =&gt; s.Category.CategoryId == categoryId);
          }
          else
          {
              tags.Include(s =&gt; s.Category);
          }
  </code></pre>
  
  <p>Could anyone explain why my code doesn't work? And how to implement this functionality? Thanks.</p>