App_Code.Controls.CategoryList.HasPosts C# (CSharp) Method

HasPosts() private static method

Determines whether the specified category has posts.
private static HasPosts ( Category cat ) : bool
cat Category /// The category. ///
return bool
        private static bool HasPosts(Category cat)
        {
            return
                Post.Posts.Where(post => post.IsVisible).SelectMany(post => post.Categories).Any(
                    category => category == cat);
        }