diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogPostHandler.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogPostHandler.cs index 967d6f2f5..af551ae28 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogPostHandler.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogPostHandler.cs @@ -35,8 +35,8 @@ namespace Orchard.Blogs.Handlers { // Ensure we get the "right" set of published posts for the blog blog.ContentItem.ContentManager.Flush(); - var posts = _blogPostService.Get(blog, VersionOptions.Published).ToList(); - blog.PostCount = posts.Count; + var postsCount = _blogPostService.Get(blog, VersionOptions.Published).Count(); + blog.PostCount = postsCount; }); OnInitializing((context, bp) => {