title: how to put conditional WHERE clause within LINQ query
body: <p>I'm trying to do below where <code>condition</code> is true, I want to execute <code>WHERE</code> else no.</p>
  
  <pre><code>var condition = true;
  
  var mast = new List&lt;Master&gt;
  {
      new Master{Id = 2, Prop1 = "Default", Prop2 = "Data", Prop3 = 11},
      new Master{Id = 3, Prop1 = "Some", Prop2 = "TestData", Prop3 = 11},
      new Master{Id = 4, Prop1 = "Some", Prop2 = "MoreData", Prop3 = 11},
  };
  
  var g = mast.Where(w=&gt; condition ? (x =&gt; x.Prop1.ToLower() != "default" || x.Prop2.ToLower() != "data") : true = true).ToList();
  </code></pre>
  
  <p>Above code giving me error,</p>
  
  <blockquote>
    <p>Type of conditional expression cannot be determined because there is no implicit conversion between 'lambda expression' and 'bool'</p>
  </blockquote>