Skip to content

Instantly share code, notes, and snippets.

@jbogard
Created September 20, 2012 13:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbogard/3755845 to your computer and use it in GitHub Desktop.
Save jbogard/3755845 to your computer and use it in GitHub Desktop.
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);
}
@hahmed
Copy link

hahmed commented Sep 26, 2012

@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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment