title: System.Linq.IQueryable Error
body: <p>I'm working on a ASP.NET MVC (an older version) application and I need to create a form to find reservations based on two parameters: Date and RoomID. There are underlying tables in the database: ReservationRequests and Rooms linked by RoomID.</p>
  
  <p>I wrote this query in the Repository:</p>
  
  <pre><code>public IQueryable&lt;ReservationRequest&gt; FindReservationRequestInfo(DateTime date, int roomID)
      {
          return from requests in FindAllReservationRequests()
                  where requests.Date == date
  
                      &amp; requests.RoomID == roomID
  
                  select requests;
      }
  </code></pre>
  
  <p>The Model looks like:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web.Mvc;
  namespace RoomReservations.Models
  {
      public class FindReservationRequestInfo
  {
      public IQueryable&lt;string&gt; ReservationRequestsInfo { get; set; }
      public DateTime Date { get; set; }
  
      public SelectList Rooms { get; set; }
  
      public FindReservationRequestInfo(IQueryable&lt;string&gt; reservationRequestsInfo, DateTime date, SelectList rooms)
      {
          ReservationRequestsInfo = reservationRequestsInfo;
          Date = date;
          Rooms = rooms;
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>And the code in the Controller is:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.Mvc;
  using System.Web.Mvc.Ajax;
  using RoomReservations.Models;
  using RoomReservations.Helpers;
  using Telerik.Web.Mvc;
  
  
  namespace RoomReservations.Controllers
  {
      public class ReportsController : Controller
  {
      IRepository Repository;
  
      public ReportsController()
          : this(new Repository())
      {
      }
  
      public ReportsController(IRepository repository)
      {
          Repository = repository;
      }
  
  
      //
      // GET: /Reports/FindReservationRequestInfo
      [Authorize(Roles = "Administrator")]
      public ActionResult FindReservationRequestInfo()
      {
          IEnumerable&lt;Room&gt; rooms = Repository.FindAllRooms();
          rooms = rooms.Concat(new List&lt;Room&gt;() { new Room() }.AsEnumerable()).OrderBy(o =&gt; o.ID);
  
          return View(new FindReservationRequestInfo(
              new List&lt;string&gt;().AsQueryable(), DateTime.Today,
              new SelectList(rooms, "ID", "Name")));
      }
  
      //
      // POST: /Reports/FindReservationRequestInfo
      [AcceptVerbs(HttpVerbs.Post), Authorize(Roles = "Administrator"), ValidateAntiForgeryToken]
      public ActionResult FindReservationRequestInfo(FormCollection collection)
      {
          IQueryable&lt;string&gt; reservationRequestsInfo;
          DateTime date = DateTime.Today;
  
          Room room = Repository.GetRoom(Convert.ToInt32(collection["ID"]));
  
          if (collection["Date.Date"] == String.Empty)
              ModelState.AddModelError("Date.Date", "Date is required");
  
  
  
          if (ModelState.Sum(s =&gt; s.Value.Errors.Count()) == 0)
          {
              date = DateTime.Parse(collection["Date.Date"]);
  
              if (room == null)
              {
                  room = new Room();
                  reservationRequestsInfo = Repository.FindReservationRequestInfo(date, room.ID);
              }
  
          }
          else
          {
              reservationRequestsInfo = new List&lt;string&gt;().AsQueryable();
          }
  
          IEnumerable&lt;Room&gt; rooms = Repository.FindAllRooms();
          rooms = rooms.Concat(new List&lt;Room&gt;() { new Room() }.AsEnumerable()).OrderBy(o =&gt; o.ID);
  
          return View(new FindReservationRequestInfo(
              reservationRequestsInfo, date,
              new SelectList(rooms, "ID", "Name", room.ID)));
      }
   }
  </code></pre>
  
  <p>}
          //</p>
  
  <p>I'm not sure what is wrong with my code in the Controller. I will be very grateful if somebody could help me to understand what I did wrong.
  Thank you very much in advance!</p>