title: The LINQ lambda expression not working
body: <p>I have the below Linq expression </p>
  
  <pre><code>var orderByLambda = Expression.Lambda&lt;Func&lt;Queue, int&gt;&gt;(
      nullCheckExpression, parameterExpression);
  
  queue = context.Table
      .Join(context.tablea, cq =&gt; cq.a, r =&gt; r.a, (cq, r) =&gt; new { cq, r })
      .Join(context.tableb, s =&gt; s.r.b, se =&gt; se.b, (s, se) =&gt; new { s, se })
      .Join(context.tablec, u =&gt; u.s.cq.c, us =&gt; us.c, (u, us) =&gt; new { u, us })
      .Where(cq =&gt; cq.u.s.cq.c == Utilities.Authentication.c)
      .Where(cq =&gt; buildStatusOrder.Contains((BuildStatusEnum)cq.u.s.cq.d))
      .OrderBy(o =&gt; o.u.se.b)
      .Select(s =&gt; new QueueInfo
      {
          x = s.u.c,
          y = s.u.d,
          z = s.u.a
      });
  
  queue = queue.OrderBy(f =&gt; orderByLambda);
  
  var concat = queue.GroupBy(e =&gt; new { e.x, e.y, e.z })
      .OrderBy(v =&gt; v.FirstOrDefault().segmentID)
      .ToList()
      .Select(ss =&gt; new QueueInfo
      {
          x = ss.x,
          y = ss.y,
          z = ss.z,
      })
      .AsQueryable();
  </code></pre>
  
  <p>I am getting below error in <code>concat</code> </p>
  
  <pre><code>The LINQ expression node type 'Lambda' is not supported in LINQ to Entities.
  </code></pre>
  
  <p>What went wrong in my code?</p>