EntityFunctions
is specific to Linq-to-Entities. ToList
creates a regular List
, so any queries on the list will be Linq-to-Objects from that point.
Try the following:
var query = (from b in db.StudentProgressPerDay
where b.Student.Equals(InputStudent)
orderby b.Date
select b).ToList();
var dates = list.Select(x => (x.Date - query.Min(y => y.Date)).Days);