You can build up the object criteria that you want to use during a graph expansion in the same way as you can create a dynamic query. For more information on how to build object criteria, see the Using the Dynamic Query in the Data Access Layer (DAL).