protected override Expression VisitMethodCall(MethodCallExpression node) { // Ignore Includes here if (node.Method.Name == nameof(QueryableExtensions.IncludePlan)) { return(null); } bool matched = false; foreach (var matcher in _methodMatchers) { if (matcher.TryMatch(node, this, out var op)) { _parent.AddResultOperator(op); matched = true; break; } } if (!matched) { var method = node.Method; throw new NotSupportedException($"Marten does not (yet) support the {method.DeclaringType.FullNameInCode()}.{method.Name}() method as a Linq selector"); } return(null); }
protected override Expression VisitMethodCall(MethodCallExpression node) { bool matched = false; foreach (var matcher in _methodMatchers) { if (matcher.TryMatch(node, this, out var op)) { _parent.AddResultOperator(op, null); // SHOULD be impossible to get an Include operator here. matched = true; break; } } if (!matched) { var method = node.Method; throw new NotSupportedException($"Marten does not (yet) support the {method.DeclaringType.FullNameInCode()}.{method.Name}() method as a Linq selector"); } return(null); }