Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
public class ListPostsQuery
{
private readonly IDocumentSession session;
public ListPostsQuery(IDocumentSession session)
{
this.session = session;
}
public List<Post> Execute(int currentPage, int defaultPage, int pageSize, out RavenQueryStatistics stats)
{
return session.Query<Post>()
.Include(x => x.AuthorId)
.Statistics(out stats)
.WhereIsPublicPost()
.OrderByDescending(post => post.PublishAt)
.Paging(currentPage, defaultPage, pageSize)
.ToList();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.