Add a Linq clause to a Iqueryable object
I have a method who get a Iqueryable object get from a LINQ Query On this object, i want to add a LINQ clause : .skip(20) How can i do that from my method ?
Thanks by advance
You can't "add" a clause to an existing query, because the queries themselves are immutable - but you can create a new query which is the existing one but with an extra clause:
IQueryable<Foo> newQuery = oldQuery.Skip(20);