How to create custom Take() in Linq?

Jul 17, 2013 at 2:02 AM
Edited Jul 17, 2013 at 2:04 AM
Im building this custom provider for db2, and id like to know, if there´s anyway to build a custom "Take" method, cuz in db2, the "LIMIT" (or TOP) is built like this:

select x from y FETCH FIRST 10 ROWS ONLY...-

How can I do that?

Or, can I write this fetch, with linq?

Jul 17, 2013 at 3:59 AM
What i did... to solve this, i made a method called "SetLimit" under my Context class, and in Execute method, i just verify if the variable limit is greater than 0, i write manually the limit query, and i set the variable back to 0... simple...