From a custom SQL query I'd like to get an IQueryable (I have my reasons):
Something like:
IQueryable<Client> query = Foo<Client>("SELECT * FROM Clients WHERE ...");
query.Where(e => e.Active==true).Skip(10).Take(10); //etc.
Is there any way to implement Foo?
I found ExecuteQuery<T>(...).AsQueryable()
, but that doesn't work as it loads all records.