6

Closed

Add count

description

It would be nice to add Count() to query for proper paging implementation (total row counts / rows per page = total pages).

Code example :
public PagedResult<User> GetUsersForApplication(Application application)
    {
        using (var con = DbHelper.Connection)
        {
var rows = con.Query(new SQLinq<int>().Where(x => x.ApplicationGuid == application.ApplicationGuid).Count()).SingleOrDefault()
var users = con.Query(new SQLinq<User>().Where(x => x.ApplicationGuid == application.ApplicationGuid).Skip(10).Take(10)).ToList();

return.....
        }
    }
Closed Aug 2, 2014 at 10:45 PM by crpietschmann
This has been added and will be included in the next release

comments