public Expression Generate(Function method, IEnumerable<Expression> arguments) { var instance = arguments.First(); var propertyName = method.GetDotNetMethodName(); var propertyInfo = instance.Type.GetProperty(propertyName); if (propertyInfo == null) { throw new NotSupportedException(String.Format("Method '{0}' not supported for type '{1}'.", method.GetODataQueryMethodName(), instance.Type)); } return Expression.MakeMemberAccess(instance, propertyInfo); }