开发者

How to use Massive.cs's .Paged() query with table joins?

I'm using Massive, by Rob Conery, as my "DAL". I've built a repository class using it. I've run into a small problem. I'd like to use the .Paged() method to build paging into one of my ASP.NET MVC views.

Right now, without pagi开发者_StackOverflowng, I'm using .Query()

return docTbl.Query("SELECT DISTINCT BaseDocs.* FROM BaseDocs
                     INNER JOIN DocCats ON BaseDocs.DocId = DocCats.DocId
                     WHERE DocCats.CatId IN (1,2,3,4) AND BaseDocs.BaseId = @0
                     ORDER BY BaseDocs.DateUpdated DESC", baseId);

I'd like to have this paged, using the .Paged() method, here I use it (not on a joined table)

return docTbl.Paged(where: "BaseId = @0", orderby: "DateUpdated DESC",
                    currentPage: currentPage, pageSize: pageSize, args: baseId );

Judging by reviewing the .Paged() code in Massive.cs, this may not be possible. Am I missing something?

Thanks in advance.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜