title: How to make IQueryable<out T> work with a reqular IQueryable?
body: <p>I am using Linq2SQL and working with a legacy system.  The system was built in .Net but without a datalayer so I am transcoding it so that it will have one.  I have a linq query that looks like this...</p>
  
  <pre><code> var data = from p in db.tblPeoples
                     orderby p.strLastName,p.strFirstName
                     select new
                     {
                         guidPersonId = p.guidPersonId,
                         strFirstName = p.strFirstName,
                         strLastName = p.strLastName,
                         strRank = p.tblCodesRank.strDescription,
                         strPhone = p.strPhone,
                         strEmail = p.strEmail,
                         strOffice = p.tblOrganization.strAcronym,
                         RolesList = p.tblRoles
                     };
  </code></pre>
  
  <p>and when I check the signature of the var it is an IQueryable and I have no idea what that is.  In my datalayer I have this returning as an IQueryable, but when I try to use the datalayer version and then do a .where on the returned dataset to search on it, I get errors that I Cannot convert lambda expresstion to type 'string' because it is not a delegate type.</p>
  
  <p>What should I do about this?  I am trying to create code reuse and use my datalayer version that is already written.  the data layer version looks like this:</p>
  
  <pre><code>public static IQueryable RetrieveAllPeople()
  {
              var data = from p in db.tblPeoples
                 orderby p.strLastName, p.strFirstName
                 select new
                 {
                     guidPersonId = p.guidPersonId,
                     strFirstName = p.strFirstName,
                     strLastName = p.strLastName,
                     strRank = p.tblCodesRank.strDescription,
                     strPhone = p.strPhone,
                     strEmail = p.strEmail,
                     strOffice = p.tblOrganization.strAcronym,
                     RolesList = p.tblRoles
                 };
  
      return data;
  }
  </code></pre>