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.
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?
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 => s.name == name); <-- Error occurs
return data;
}