Quick question: would this trigger one query per each Tag item?
public static IQueryable<Tag> WhereTagHasLivePosts(this IQueryable<Tag> q)
{
return q.Where(t => t.Posts.Where(p => DateTime.Now >= p.PublishTime && p.IsPublished == true).Count() > 0);
}
t.Posts.Where is actually an extension on IEnumerable, rather than IQueryable, so it seems like this might not be a good idea.
Thanks in advance,
Rei