title: C# Method Syntax to Query Syntax
body: <p>I am pretty new to LINQ in C#. How can I rewrite the following using query syntax?  </p>
  
  <pre><code>var jobs =
            context.Job
              .Include(j =&gt; j.PlannedJobStopDetails
                .Select(jsd =&gt; jsd.PlannedTravelStop)
              )
              .Where(
                j =&gt; j.DateUpdated &gt;= dateFrom &amp;&amp; j.DateUpdated &lt;= dateTo &amp;&amp;
                     j.PlannedJobStopDetails.Any(
                       jsd =&gt; jsd.DateUpdated &gt;= dateFrom &amp;&amp; jsd.DateUpdated &lt;= dateTo
                           &amp;&amp; jsd.PlannedTravelStop.PlannedTravelStopStatus == status
                       )
              );
  </code></pre>
  
  <p>I am using Entity Framework and I am trying to run the query in LINQPad</p>