title: Linq using TakeWhile in a query
body: <p>Hi i just started learning linq and have been trying to understand the TakeWhile usage</p>
  
  <p>here i have tried something like this </p>
  
  <pre><code> using (  var db = new OrchestrateDataEntities())
          {
  
  
              var y = db.Set&lt;Rulebook_Mapping&gt;();
              var xyz = y.TakeWhile(x =&gt; x.ID == 2).AsQueryable();
              foreach (var item in xyz)
              {
                  Console.WriteLine(item.ID);
  
  
              }
  
          }
          Console.ReadKey();
  </code></pre>
  
  <p>and then comes the error </p>
  
  <pre><code> LINQ to Entities does not recognize the method 'System.Linq.IQueryable`1[ConFW.Rulebook_Mapping] TakeWhile[Rulebook_Mapping](System.Linq.IQueryable`1[ConFW.Rulebook_Mapping], System.Linq.Expressions.Expression`1[System.Func`2[ConFW.Rulebook_Mapping,System.Boolean]])' method, and this method cannot be translated into a store expression.
  </code></pre>