O
I love these bits of code:
if(query.HasCategory || query.HasNoCategories)
If it has a category, or it doesn't have a category. or this 'if' statement is extremely redundant, then...
Later on:
if(!query.HasNoCategories && query.HasCategory)
If it doesn't (not have categories), or it (has a category), or (x), or not (not x), then..
I also like the mixed pluralization (plural "HasNoCategories" yet singular "HasCategory").