private static bool HasPosts(Category cat) { return Post.Posts.Where(post => post.IsVisible).SelectMany(post => post.Categories).Any( category => category == cat); }