I have an `Expression<Func<Entity, string>>` that can be either a property or a nested property accessor

```
y => y.SearchColumn

```

or 

```
y => y.SubItem.SubColumn

```

I am building up an expression tree dynamically and would like to get an InvokeExpression like this

```
x => x.SearchColumn.Contains("foo");
x => x.Sub.SearchColumn.Contains("foo");

```

I'm pretty sure I can unwrap the Expression body, then partially apply the x `ParameterExpression` to it but I can't figure out the magical incantations to make this happen

So I have something like

```
Expression<Func<Entity, string>> createContains(Expression<Func<Entity, string>> accessor) {
    var stringContains = typeof(String).GetMethod("Contains", new [] { typeof(String) });
    var pe = Expression.Parameter(typeof(T), "__x4326");
    return Expression.Lambda<Func<Entity, bool>>(
        Expression.Call(
            curryExpression(accessor.Body, pe),
            stringContains,
            Expression.Constant("foo")
        )
        , pe
    );              
}

    static Expression curryExpression(Expression from, ParameterExpression parameter) {
        // this doesn't handle the sub-property scenario
        return Expression.Property(parameter, ((MemberExpression) from).Member.Name);
        //I thought this would work but it does not
        //return Expression.Lambda<Func<Entity,string>>(from, parameter).Body;
    }

```

**Edit:**
[Here is the full thing I'm trying to do along with the error](https://dotnetfiddle.net/wo1Cfi)