title: How to dynamically add or remove where clause in LINQ
body: <p>Here is my <code>LINQ</code> query that needs to update to dynamic where clause.
  If parameter's <code>id</code> value is 0 then where clause should return all records else where clause should match records as per id value.</p>
  
  <pre><code>public async Task&lt;IEnumerable&lt;dynamic&gt;&gt; GetFilteredRowsByID(int id)
          {
              return from m in _context.TableName
                     where m.id == (id != 0 ? id : /*AllRecordsHere*/ )
                     join ...
                     join ...
                     select new {...}
          }
  </code></pre>
  
  <p>I use <code>Asp.Net Core 2.2</code>. Is it possible without writing another method witout where clause for this?</p>