Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add Page<T> override to support user defined SQL for Count and Paging #104
Added a Page override that accepts Sql objects for the Count and Page queries in order to support scenarios when the SQL to Page cannot be rewritten correctly by PetaPoco.
The use case we encountered was a CTE query involving a UNION that PetaPoco could not rewrite for SQL Server with proper row_number paging syntax. The following gist shows an example how the Page support from this pull request can be called directly from client code: https://gist.github.com/2126002
Merged in v5 branch. See http://www.toptensoftware.com/Articles/137/Long-Time-No-Post-and-PetaPoco-v5