Пример #1
0
        public static Page <TRet> Page <T1, T2, TRet>(this Database db, Func <T1, T2, TRet> cb, int page, long itemsPerPage, string sql, params object[] args)
        {
            string sqlCount, sqlPage;

            db.BuildPageQueries <TRet>((page - 1) * itemsPerPage, itemsPerPage, sql, ref args, out sqlCount, out sqlPage);
            return(db.PageByCb <T1, T2, TRet>(cb, page, itemsPerPage, sqlCount, args, sqlPage, args));
        }