コードを簡素化して loadoptions とアソシエーション フィルタリングを追加したいので、このクラスを作成しました。
class GraphQuery<T>
{
    private IQueryable<T> query;
    private DataLoadOptions load;
    public GraphQuery(DataLoadOptions load, IQueryable<T> query)
    {
        this.load = load;
        this.query = query;
    }
    public GraphQuery<T> Load(
            Expression<Func<T, object>> expr, 
            Expression<Func<T, object>> filter)
    {
        load.LoadWith(expr);
        load.AssociateWith(filter);
        return this;
    }
    // more public methods ...
}
その後、次のように使用できます。
var clients = Graph(db.Clients.Where(e => !e.Deleted))
    .Load(e => e.ClientPersons, 
        e => e.ClientPersons.Where(j => !j.Person.Deleted));
ただし、非常に単純な繰り返しが見られe => e.ClientPersonsます。したがって、上記の使用法を次のように減らしたいと思います。
var clients = Graph(db.Clients.Where(e => !e.Deleted))
    .Load(e => e.ClientPersons.Where(j => !j.Person.Deleted));
Load関数は次のようになります
    public GraphQuery<T> Load(Expression<Func<T, object>> filter)
    {
        var expr = ... extract first part of the expression that represents the association property
        load.LoadWith(expr);
        load.AssociateWith(filter);
        return this;
    }
クエリで使用する場合を除いて、linq式を使用したことはありません