JustBlog.Core.BlogRepository.TotalPosts C# (CSharp) Метод

TotalPosts() публичный Метод

Return total no. of all or published posts.
public TotalPosts ( bool checkIsPublished = true ) : int
checkIsPublished bool True to count only published posts
Результат int
        public int TotalPosts(bool checkIsPublished = true)
        {
            return _session.Query<Post>().Where(p => !checkIsPublished || p.Published == true).Count();
        }