title: Divide LINQ to Entity queries in to different methods
body: <p>want to be able to do something like this below. But I have a problem because the GetStudentByName method does not know what type data is.</p>
  
  <p>Im able to  write the "data = data.Where(s => s.name == "Some name");" without any problems. But how do i divide it into different methods?</p>
  
  <pre><code>    private IQueryable GetStudents()
      {
          var data = from a in db.Anvandning
                     select a;
          return data;
      }
      public IQueryable GetStudentByName(string name) 
      {
          var data = GetStudents();
  
          data = data.Where(s =&gt; s.name == name);     &lt;-- Error occurs
          return data;
      }
  </code></pre>