適切な関連付けプロパティが存在すると仮定すると、次のことができます。
var activeCategories = from category in _db.Categories
where category.Items.Any(item => item.IsActive)
select category;
参加する必要がある場合は、次のようにしてみてください。
var activeCategories = from category in _db.Categories
join item in _db.Items on category.Id equals item.CategoryId
into categoryGroup
where categoryGroup.Any(i => i.IsActive)
select category;
(また)
var activeCategories = from category in _db.Categories
join item in _db.Items.Where(i => i.IsActive)
on category.Id equals item.CategoryId
into categoryGroup
where categoryGroup.Any()
select category;
(また)
var activeCategories = from category in _db.Categories
where _db.Items
.Where(i => i.IsActive)
.Select(i => i.CategoryId)
.Contains(category.Id)
select category;