The answer is "no, BUT ."
Passing it to IEnumerable does not lead to enforcement. Operators in the IEnumerable space (for example, the Where method) can still be evaluated lazily.
But there are some warnings here. If you start using LINQ statements inside this method, then LINQ will select Enumerable LINQ statements, such as GroupBy (IEnumerable), instead of Queryable statements, such as GroupBy (IQueryable) . Note that they differ in the parameter list.
The effect of this is that your passed Lambda expression will be converted to Func instead of Expression> (note the difference in the parameter list of the two corresponding methods). Thus, your lambda will not be an expression tree, and this is what Queryable sources need to translate it to SQL (or similar) so that the query can be transmitted across the server and executed on the server side.
So your request will be slower. Not because it will be executed after you pronounce it, but because the entire data source will be redirected to the client as soon as you start trying to remove elements from it.
This, of course, is only if you start using LINQ (attach "Where" or something) inside this method. If you do not, you are fine.
source share