score:0

Accepted answer
...
    if(offices.any())
    {
        // get all active single steps and the ones that contain the offices
        singlesteps = _singlestepservice.where(s => s.statusid == (int)enumerations.stepstatus.active).where(s => offices.contains(s.officeid));  

        // get all of the parent workflows for the singlesteps
        var workflows = singlesteps.select(w => w.workflow);

        // update the query with the limited scope
        query = query.where(q => q.workflow.contains(q));
    }
    return query.tolist();
}

Related Query

More Query from same tag