Created
September 20, 2012 13:18
-
-
Save jbogard/3755845 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ActionResult Index() | |
{ | |
RavenQueryStatistics stats; | |
var posts = RavenSession.Query<Post>() | |
.Include(x => x.AuthorId) | |
.Statistics(out stats) | |
.WhereIsPublicPost() | |
.OrderByDescending(post => post.PublishAt) | |
.Paging(CurrentPage, DefaultPage, PageSize) | |
.ToList(); | |
return ListView(stats.TotalResults, posts); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jbogard - I really like the way racoon blog works with the raven session - do you have an example nhibernate? Everywhere I have seen is way too complex.
re: http://lostechies.com/jimmybogard/2012/09/20/limiting-your-abstractions/