public
Created

  • Download Gist
Action.cs
C#
1 2 3 4 5 6 7 8 9 10 11 12 13
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);
}

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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.