Did some more digging and found the following solution
var selfJoin =
from child in Context.GlobalDocumentClassification
from parent in Context.GlobalDocumentClassification
select new { child, parent };
var query = from item in selfJoin
where item.child.HierarchyId.IsDescendantOf(item.parent.HierarchyId) &&
EF.Constant(ids).Contains(item.parent.Id)
select item.child.Id;
This produces SQL-Server cross join query and allows for the use of IsDescendantOf()
in the queries where clause.