ForEach() is defined on the List<T> class, but not on IQueryable<T> or IEnumerable<T>. You have two choices in those cases:
ToList first
The enumeration (or query) will be evaluated, copying the results into a new list or calling the database. The method is then called on each it...