title: Extension method not applying LINQ where clause
body: <p>I'm trying to implement Query objects into my code, but have encountered a problem. When passing  <code>meetId = 1</code> to GetMeetingDTO an exception is thrown by <code>SingleOrDefault()</code>. My Database currently holds 6 meetings all with unique Ids (1-6). I have checked if values are passed correctly via <code>FilterOptions</code> to <code>FilterMeetingsBy</code> and I looks ok (using Visual Studio). Apparrently no filtering is applied thus <code>SingleOrDefault</code> throws the error. I have tested leaving out the extension method and applying <code>.Where(p =&gt; p.Id == 1)</code> directly on the context. Then no error is thrown...</p>
  <pre><code>    public async Task&lt;MeetingDTO&gt; GetMeetingDTO(long meetId)
      {
          IEnumerable&lt;Meeting&gt; meetings = await context.MeetDbSet
              .FilterMeetingsBy(new FilterOptions { MeetingId = meetId }).ToListAsync();
  
          return mapper.Map&lt;MeetingDTO&gt;(meetings.SingleOrDefault());
      }
  </code></pre>
  <p>Here is the extension method</p>
  <pre><code>public static class FilterMeetings
  {
      public static IQueryable&lt;Meeting&gt; FilterMeetingsBy(this IQueryable&lt;Meeting&gt; meetings, FilterOptions options)
      {
          if (options == null)
              return meetings;
  
          if (options.MeetingId.HasValue)
          {
              meetings.Where(p =&gt; p.Id == options.MeetingId.Value);
              return meetings;
          }
  
          if (options.SortFromDate.HasValue)
              meetings.Where(p =&gt; p.StartDate &gt;= options.SortFromDate.Value);
          if (options.SortToDate.HasValue)
              meetings.Where(p =&gt; p.StartDate &lt;= options.SortToDate.Value);
  
          return meetings;
      }
  }
  
  public class FilterOptions
  {
      public long? MeetingId { get; set; }
  
      public DateTime? SortFromDate { get; set; }
      public DateTime? SortToDate { get; set; }
  }
  </code></pre>